TRUSTWORTHY is a SQL Server database property that allows a database to access server-level resources through ownership chaining and execution context changes. When enabled, it can let code in that database perform actions outside the database boundary under the database owner’s authority.
What the TRUSTWORTHY property changes in SQL Server
TRUSTWORTHY is not a database feature for ordinary application logic, it changes the trust boundary between a SQL Server database and the instance itself. When enabled, database code can inherit the database owner’s authority and reach server-level capabilities that would normally stay outside the database scope, so the setting must be treated as a privilege boundary, not a convenience toggle.
The key issue is that ownership chaining and execution context changes can turn a database into a bridge to broader server permissions. That is why the property is usually discussed alongside escalation paths, permission inheritance, and why a database that looks self-contained can still affect the host instance if trust is granted too broadly.
Why TRUSTWORTHY is security-sensitive
On its own, the property does not create a vulnerability; it creates a condition where existing code, modules, or misconfigurations may be able to cross from database permissions into server permissions. That makes it especially sensitive in shared environments, administrative databases, and any design where the database owner is more privileged than the application actually needs.
Security teams should treat it as a potential path for privilege expansion. If an attacker can influence code running in a TRUSTWORTHY database, the impact can extend beyond data access to instance-level actions, depending on the surrounding permissions and server configuration.
For examples of how database trust and exposed secrets can become an incident path, see MongoBleed breach and Firebase misconfiguration exposure 2024.
How to assess exposure to TRUSTWORTHY
Exposure review starts with inventorying which databases have the property enabled, who owns them, and whether those owners have broader server permissions than intended. That review should be paired with an assessment of whether any database modules, CLR assemblies, or stored procedures rely on server-level access as part of normal operation.
Because the property is instance-specific in effect, the practical question is not only whether the database needs it, but whether the surrounding ownership model makes the trust relationship safe. Vendor guidance and hardening baselines are the right place to verify the expected configuration for the product version in use.
When reviewing the underlying control intent, CIS Benchmarks and NIST SP 800-53 Rev 5 Security and Privacy Controls provide useful baselines for configuration review, privilege restriction, and auditability.
Remediation, detection, and post-change review
If TRUSTWORTHY is not strictly required, the safest posture is to disable it and redesign the dependency so the database does not need to borrow server authority. Where it must remain enabled, the surrounding controls matter just as much as the setting itself: ownership, permissions, code provenance, and server-side restrictions should all be reviewed together.
Detection should focus on finding unexpected use of elevated context, unusual server-level actions originating from a database that should be bounded, and changes in ownership or module behavior after deployment. After any suspected abuse or configuration change, review the database for new objects, altered procedures, and other persistence mechanisms that may have been introduced through the trust boundary.
For a broader control lens on least privilege and trusted execution boundaries, NIST Cybersecurity Framework 2.0 and NIST SP 800-207 Zero Trust Architecture reinforce the same principle: do not assume a component should inherit trust simply because it sits inside the platform.
Risk and Threat Considerations
TRUSTWORTHY becomes risky when an application database can be induced to act with higher server authority than the application truly needs. The most important threat is privilege escalation through code execution or ownership chaining, especially when a database owner, module, or dependency is more trusted than the data or workload deserves.
Failure mechanism: A database marked trustworthy can allow database-resident code to execute under elevated context, which can be abused to reach server-level resources or perform actions that bypass the intended database boundary.
Impact: If that boundary is crossed, an attacker may gain wider instance control, alter security settings, access protected data, or establish persistence beyond the original database scope.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5, CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | Trustworthy databases can expand effective permissions beyond the database boundary. |
| CM-6 — Configuration Settings | TRUSTWORTHY is a configuration choice that materially changes SQL Server trust boundaries. | |
| Recommendation — Minimise elevated database owner privileges and remove unnecessary server-level authority. Review and standardise database trust settings as part of hardened configuration baselines. | ||
| CIS Controls v8 | CIS-4 — Secure Configuration of Enterprise Assets and Software | Database trust configuration is a hardening issue that affects exposure and privilege boundaries. |
| Recommendation — Harden SQL Server configurations and validate TRUSTWORTHY against approved baselines. | ||
| NIST CSF 2.0 | PR.AA-01 — Identities and Credentials Are Managed for Authorized Devices, Users and Services | The property changes how a database identity can inherit authority and reach resources. |
| DE.CM-01 — Networks and Network Services Are Monitored to Find Potentially Adverse Events | Unexpected server-level actions from a database are detectable adverse events for monitoring. | |
| Recommendation — Restrict database identities so they cannot inherit broader authority without explicit approval. Monitor for anomalous server-level actions originating from trusted databases. | ||
Practitioner Guidance
Why practitioners should care: This property is a governance decision about trust inheritance, not just a SQL setting. If you enable it, you are effectively approving a wider authority model that must be justified, documented, and continuously reviewed.
Governance implication: Treat TRUSTWORTHY as an exception requiring explicit ownership and periodic revalidation. The main question is whether the workload can be redesigned so the database no longer needs to borrow server-level authority at all.
Practitioner takeaway: Default to least trust, then prove why any exception is necessary and safe.
Related resources from NHI Mgmt Group
- How should security teams automate database access without creating new privilege creep?
- When does database access automation create more risk than it reduces?
- How do you know whether an AI-driven investigation workflow is actually trustworthy?
- What breaks when end users still see database credentials or SSH keys?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 9, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org