Database servers drift out of their secure configuration quietly: a test instance appears on a production subnet, an engine falls off vendor support, an application account is given owner rights to fix a release, and audit events stop reaching the SIEM after an upgrade, while every dashboard still shows the databases as up. This health check is a recurring, measurable review of the database estate as a platform: the instances themselves, their versions and patches, network reach, encryption, built-in features and accounts, the credentials applications use, audit delivery, backups and non-production copies. It turns those questions into fourteen metrics with formulas and thresholds that a database lead, internal auditor or CISO can compare quarter on quarter, plus weekly and monthly checks that feed them.
This page measures; it does not explain how to secure a database. For controls and design use the Database Security Guide, and for engine-specific settings use your engine's own security guide. The check is vendor-neutral and applies to relational and non-relational engines, self-managed on servers or virtual machines, and managed database services where you still control configuration, accounts and network rules.
What this health check covers
The review covers six areas, each tied to metrics below:
- Estate: whether every running database instance is known, owned and classified by the data it holds.
- Currency: engine versions inside vendor support and security patches applied within your deadline, following the preventive maintenance view of NIST SP 800-40 Rev. 4.
- Exposure: who can reach each listener on the network, and whether connections and stored data are encrypted.
- Configuration: default accounts, sample databases and high-risk features such as operating system command execution, checked against a benchmark such as the CIS Benchmarks.
- Credentials: the accounts applications and services use to connect, their rights and their secret hygiene.
- Evidence and recovery: audit events reaching a log platform the database administrators do not control, and backups that restore.
It deliberately does not repeat the privileged user recertification in the Database Privileged Access Review Template: standing administrator grants, unused privilege and break-glass sessions are measured there. Run both; this check covers the platform around those people.
Key takeaways
- Count instances from the network, not from the register. Unknown instances found by scanning for database listeners are the ones with default settings and no patching.
- Support status is a security control. An engine past vendor support receives no security fixes, so treat it as red regardless of its patch level.
- Application accounts are the largest attack surface. Owner rights, shared logins and passwords in configuration files turn an injection flaw into full database control.
- Audit that only lives on the server is not evidence. Measure delivery to the log platform, not whether auditing is switched on.
- A backup is healthy only after a restore. Score tested restores and encryption, not job success messages.
How to use this template
Copy the metrics table and the findings log into your own tracker and run the review at the cadence below. Collect each figure from the data sources described, score it against the bands, and record every amber or red result as a finding with an owner and a due date. Split each metric by tier (for example, instances holding regulated or customer data, other production, non-production) and keep each completed review so trends show. If different teams run different engines, run the check per team and report the results side by side.
Cadence and sign-off
| Review | Frequency | Owner | Approver | Evidence kept |
|---|---|---|---|---|
| Audit delivery and failed backup check | Weekly | Database operations | Database lead | Silent audit source list, failed backup job list, tickets raised |
| Network discovery of database listeners | Monthly | Security operations | Database lead | Scan output, matched and unknown instance lists |
| Patch and version status | Monthly | Database operations | Head of infrastructure | Version report per instance, patch deadline status, exceptions |
| Benchmark configuration scan | Monthly | Database engineering | Security architecture | Scan results by instance, failed checks |
| Full metrics review (this page) | Quarterly | Database lead | CISO or head of data platforms | Metrics table, raw extracts, findings log |
| Restore test from backup | Quarterly per tier 1 instance, yearly for others | Database operations | Service owner | Restore record, time taken, integrity check result |
Metrics
NHI Mgmt Group recommended thresholds; adjust to your risk appetite. "Instance" means one running database server process or managed database service endpoint. "Sensitive" means instances holding data classified as confidential or regulated under your data classification scheme.
| ID | Metric | Formula | Data source type | Green | Amber | Red |
|---|---|---|---|---|---|---|
| DB-01 | Registered instance coverage | Instances found by network discovery or cloud resource listing that are in the database register with an owner and data classification ÷ instances found | Network scan for database listener ports, cloud resource inventory, database register or CMDB | At least 98% | 93% to below 98% | Below 93% |
| DB-02 | Supported engine versions | Instances on an engine release inside vendor security support ÷ instances | Version report per instance, vendor support lifecycle list | 100% | 95% to below 100%, all with dated upgrade plans | Below 95%, or any sensitive instance unsupported |
| DB-03 | Security patch timeliness | Instances with the latest vendor security update applied within your patch deadline ÷ instances | Version and patch level report, vendor security advisories, patch deadline policy | At least 95% | 85% to below 95% | Below 85% |
| DB-04 | Listener exposure | Instances whose listener accepts connections from outside approved application and administration network ranges ÷ instances | Firewall and security group rules, network scan from untrusted segments, external attack surface results | 0% | Above 0% to 2%, non-production only | Any production instance, or any reachable from the internet |
| DB-05 | Encrypted client connections | Client sessions using TLS 1.2 or later ÷ client sessions sampled over 7 days | Database session or connection views, connection audit events | At least 99% | 90% to below 99% | Below 90% |
| DB-06 | Encryption at rest on sensitive instances | Sensitive instances with storage or database-level encryption enabled and keys held outside the database host ÷ sensitive instances | Instance configuration export, storage settings, key management records | 100% | 95% to below 100% | Below 95% |
| DB-07 | Benchmark pass rate | Benchmark checks passed ÷ benchmark checks applicable, across all instances in scope | Configuration assessment scan against the chosen benchmark profile | At least 90% | 80% to below 90% | Below 80% |
| DB-08 | Default accounts and sample content | Instances with an enabled default or vendor-supplied account using a known or unchanged password, or a sample database present ÷ instances | Account listing per instance, database listing, benchmark scan | 0% | Sample content in non-production only | Any enabled default credential |
| DB-09 | High-risk features enabled | Instances with operating system command execution, external script execution, server-side file read or write, or outbound links to other databases enabled without an approved exception ÷ instances | Instance configuration export, benchmark scan, exception register | 0% | Above 0% to 3% | Above 3%, or any on a sensitive instance |
| DB-10 | Application accounts with ownership or DDL rights | Application or service accounts that own schemas or hold create, alter or drop rights in production ÷ application or service accounts in production | Grant and role listing, account register mapping accounts to applications | Below 5%, each with an exception | 5% to 15% | Above 15% |
| DB-11 | Shared or unattributed connection accounts | Database accounts used by more than one application or person, or with no recorded owning application ÷ non-human database accounts | Connection logs by client host and program, account register | 0% | Above 0% to 5% | Above 5% |
| DB-12 | Connection secret hygiene | Application database credentials past rotation policy, plus credentials found in plaintext in code or configuration ÷ application database credentials | Secrets manager metadata, repository and configuration secret scanning | 0 plaintext and below 5% overdue | 0 plaintext and 5% to 15% overdue | Any plaintext credential, or above 15% overdue |
| DB-13 | Audit delivery | Production instances whose audit events reached the central log platform in the last 24 hours ÷ production instances | Log platform source inventory, instance audit settings | 100% | 95% to below 100% | Below 95%, or any sensitive instance silent for 24 hours |
| DB-14 | Tested and protected backups | Tier 1 instances with an encrypted backup and a successful restore test in the last quarter ÷ tier 1 instances | Backup job reports, restore test records, backup encryption settings | 100% | 90% to below 100% | Below 90% |
Why these metrics
DB-01 comes first because every other ratio is calculated over known instances; an instance nobody registered is usually the one with sample databases, default accounts and no patching. DB-04 and DB-05 reflect the OWASP Database Security Cheat Sheet advice to restrict network access to the database to the hosts that need it and to accept only encrypted connections. DB-08 and DB-09 track two items from the NSA and CISA top ten cybersecurity misconfigurations: default configurations and unrestricted code execution. Built-in features that run operating system commands or read server files let an attacker with SQL access move off the database, which is why ATT&CK lists T1505.001 SQL Stored Procedures as a persistence technique. DB-10 to DB-12 measure the accounts applications use: the cheat sheet advises against built-in superuser accounts and database ownership for applications, one account per application or service, and keeping credentials out of source code.
How to collect the data
- Instance discovery: a network scan of internal ranges for the database listener ports your engines use, plus the cloud provider's resource inventory for managed database services. Reconcile both against the database register monthly.
- Versions and patches: a version query or the management console's instance report for each instance, compared with the vendor's support lifecycle page and security advisories. Record the date each security update was released, so lateness can be measured.
- Network reach: firewall and security group rule exports for database ports, and a scan from a segment that should not reach databases, such as a user workstation network.
- Encryption: the engine's session or connection views, which usually show whether each connection is encrypted and with which protocol, sampled over a week; instance and storage settings for encryption at rest.
- Configuration: a configuration assessment scanner run against the chosen benchmark profile, with credentials limited to read-only catalogue access.
- Accounts and grants: catalogue queries listing accounts, roles, schema owners and grants per instance, matched to the account register. Connection logs that record client host and program name show which accounts are shared.
- Secrets: the secrets manager's metadata for last rotation date, and secret scanning results across repositories and configuration management code.
- Audit and backup: the log platform's list of reporting sources with last event time; backup job reports and the restore test log.
Use a dedicated read-only account for collection, held in a vault and scoped to catalogue views. A collection account with administrator rights becomes one more privileged credential to protect.
Red flags that need action now
- A database listener reachable from the internet, or from user workstation networks, that is not a deliberately published service.
- A production or sensitive instance running an engine release outside vendor security support.
- A security update for an issue listed in the CISA Known Exploited Vulnerabilities catalogue not applied within its deadline.
- Any enabled default administrator account with a vendor default or blank password.
- Operating system command execution enabled on an instance that holds sensitive data.
- An application connecting as a built-in superuser or as the database owner in production.
- Database credentials found in plaintext in a repository, container image or shared document.
- A sensitive instance with no audit events at the log platform for 24 hours or more.
- No successful restore of a tier 1 database in the last two quarters.
- Unmasked copies of production personal data in development or test environments.
Findings log
| Finding ID | Finding | Metric | Severity | Owner | Due date | Status |
|---|---|---|---|---|---|---|
| HC-DB-01 | [Short description, for example "4 unregistered instances on the build subnet"] | [DB-01] | [Critical, high, medium, low] | [Named owner] | [Date] | [Open, in progress, closed, risk accepted] |
| HC-DB-02 | [...] | [...] | [...] | [...] | [...] | [...] |
| HC-DB-03 | [...] | [...] | [...] | [...] | [...] | [...] |
Suggested due dates: critical within 7 days, high within 30 days, medium within 90 days, low by the next quarterly review. A risk acceptance needs a named approver and an expiry date.
Remediation map
| Finding type | Where the fix is described |
|---|---|
| Unregistered instances, missing owners (DB-01) | Database Security Guide |
| Unsupported versions, late patches (DB-02, DB-03) | Database Patching |
| Listener exposure, unencrypted connections (DB-04, DB-05) | Database Security Guide |
| Encryption at rest gaps (DB-06) | Database and Storage Encryption Guide |
| Benchmark failures, default accounts (DB-07, DB-08) | CIS Benchmarks Guide |
| High-risk features and outbound database links (DB-09) | Database Links and Linked Servers |
| Owner rights for applications, shared accounts (DB-10, DB-11) | How to Run a Database User Access Review |
| Overdue or plaintext credentials (DB-12) | How to rotate database credentials without downtime |
| Audit delivery gaps (DB-13) | Database Audit Log Detection Guide |
| Untested or unencrypted backups (DB-14) | Database Backup Security Guide |
| Unmasked production data in non-production | Data Masking vs Anonymisation vs Pseudonymisation |
Related guides
- Database Security Guide: the controls this check measures.
- Database Privileged Access Review Template: the companion review of administrator grants.
- Database Security Policy Template: the policy statements that set your thresholds and deadlines.
- Database Breach Response Playbook: what to do when a red flag turns out to be an incident.
- Engine-specific settings, listed alphabetically: Oracle Database Security Guide and SAP HANA Database Security.
References
- NIST: SP 800-53 Rev. 5, Security and Privacy Controls (CM-6, CM-7, CM-8, SI-2, SC-8, SC-28, AU-6, CP-4)
- NIST: SP 800-40 Rev. 4, Guide to Enterprise Patch Management Planning
- OWASP: Database Security Cheat Sheet
- NSA and CISA: Top Ten Cybersecurity Misconfigurations
- CIS: CIS Benchmarks
- CISA: Known Exploited Vulnerabilities Catalog
- MITRE ATT&CK: T1505.001 SQL Stored Procedures
Related NHI Mgmt Group resources: Database Security Guide · Database Privileged Access Review Template · Database Patching · Database Audit Log Detection Guide