Database security
Database Security Audit Fixes
MySQL, PostgreSQL, MongoDB and Redis - access, exposure and encryption.
These are the fixes for a database security audit: which accounts exist and what they can do, which interfaces the engine listens on, whether traffic is encrypted, and where the credentials are stored.
- Checks documented
- 37
- Audits in this category
- 6
- Need root or sudo
- 29
- Rated high severity
- 19
For what these audits cover rather than how to fix them, see the Database security checklist, or how the CtrlOps Security Audit runs.
By audit
6 audits, 37 checks
Grouped by the 6 audits they belong to. Authentication and network isolation come first, because together they decide whether the database is reachable by anyone at all.
How much of this is serious?
19 high, 15 medium and 3 low severity checks- 01AuthenticationPasswordless access, anonymous users, remote root and auth methods8 fixes · 8 need root7 high, 1 medium and 0 low severity checks
- 02Configuration & HardeningService users, installer defaults, patches, log placement and backups7 fixes · 5 need root4 high, 1 medium and 2 low severity checks
- 03Network IsolationEngine inventory, bindings, exposed ports and web admin tools7 fixes · 4 need root5 high, 1 medium and 1 low severity checks
- 04Least-Privilege PermissionsWildcard hosts, FILE privilege, admin accounts and allowed hosts6 fixes · 6 need root0 high, 6 medium and 0 low severity checks
- 05Transport EncryptionTLS enforcement and server certificates for client connections5 fixes · 5 need root0 high, 5 medium and 0 low severity checks
- 06Credential StorageConfig files in the web root, config permissions, exposed .git and client credential files4 fixes · 1 need root3 high, 1 medium and 0 low severity checks
Fix these first
The highest-severity findings in Database
Ordered by the impact class the audit script assigns, then by the order the audit runs them.
- Severity: HIGHNeeds rootMySQL Root PasswordChecks whether the MySQL/MariaDB root account can log in with no password from an unprivileged shellAuthentication auditCan return FAIL · SKIP · PASS
- Severity: HIGHNeeds rootMySQL Anonymous UsersChecks mysql.user for anonymous accounts that let anyone connect without credentialsAuthentication auditCan return FAIL · SKIP · PASS
- Severity: HIGHNeeds rootMySQL Passwordless AccountsChecks for MySQL accounts with an empty password that do not rely on socket authenticationAuthentication auditCan return FAIL · SKIP · PASS
- Severity: HIGHNeeds rootMySQL Remote RootChecks whether the MySQL root account is restricted to localhost or may connect from remote hostsAuthentication auditCan return FAIL · SKIP · PASS
- Severity: HIGHNeeds rootPostgreSQL Auth MethodsChecks pg_hba.conf for trust, cleartext password and md5 authentication entriesAuthentication auditCan return FAIL · WARN · SKIP · PASS
- Severity: HIGHNeeds rootMongoDB AuthorizationChecks whether security.authorization is enabled in mongod.confAuthentication auditCan return FAIL · WARN · SKIP · PASS
What these fixes cover
- Root and anonymous accounts, blank passwords and the authentication method in use
- Listening interfaces, exposed ports and web-based admin panels
- Over-broad grants: wildcard hosts, FILE privilege, superusers and admin accounts
- TLS enforcement and certificates, plus where config and backup credentials live on disk
What they do not
- Schema design, query performance or index health. These checks read security configuration only.
- Databases running inside containers. The probes look for host engines; audit those with the Docker checks or exec into the container.
- Managed database services. There is no config file to read on RDS, Cloud SQL or Atlas.
Keep going
The other three platforms
Most hosts run more than one of these. The split shows how much of each platform the audit rates as high severity.
Two reasons dominate. Either no database engine was detected on the host, in which case there is genuinely nothing to audit, or the engine is present but the script could not authenticate to it. The checks require a working root socket login (mysql -N -e "SELECT 1" as root, or psql as the postgres user); without that, they report SKIP rather than guess. Containerised databases are not detected by these probes.
The checks themselves are read-only and safe on production. The fixes are not uniformly safe: changing bind-address, require_secure_transport or a pg_hba.conf auth method will drop existing connections or lock out clients that are not ready for it. Each page states what the change breaks. Test the new setting against a staging client before reloading production.
Yes. MariaDB is detected and audited by the MySQL checks throughout, and the pages call out the places where MariaDB behaves differently, most notably that it still exposes have_ssl where MySQL 8.4 removed it.
The network isolation findings matter less, though a private network is not a trust boundary once one host on it is compromised. The authentication, least-privilege and credential-storage findings matter just as much: they are what limits the damage after an application-level breach, which is how most database compromises actually begin.
Stop juggling tools. Start managing fleets.
One app. All your servers. No context switching. Free to start, free to leave.
Start instantly · No credit card · Cancel anytime