Join our Newsletter — 33% off our NHI Course
Home› Glossary› Governance, Ownership & Risk› Database Link
Governance, Ownership & Risk

Database Link

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Governance, Ownership & Risk

A database link is a stored definition that lets a session in one database run queries against another, remote database, often using saved credentials. Attackers who compromise the source database can pivot through the link into the remote one. Defenders inventory links, restrict the remote account to least privilege, and review who may create or use them.

A database link is more than a convenience for cross-database querying. It creates a stored trust path from one database to another, so the first database can act on the second through a persistent definition rather than an ad hoc connection. That makes it an integration mechanism, but also a security boundary decision.

Because the definition is stored, the link can outlive the original use case that justified it. In practice, that means the link itself becomes part of the attack surface: it can be discovered, reused, mis-scoped or abused long after the application team has stopped thinking about it.

For Oracle environments, the underlying mechanics are covered well in the Oracle Database Security Guide, which is a useful reminder that database hardening and cross-database trust have to be designed together, not treated as separate concerns.

The security significance of a database link comes from delegated access. If the source database is compromised, an attacker may inherit the link’s path into the remote database and use that trust to read data, run queries or explore privileges that were never meant to be exposed to the original session.

That makes the link a form of lateral movement path inside the data tier. The risk is not only remote access, but also the possibility that a trusted database session can reach data or functions with a broader scope than the initiating user should ever have had.

Links also create a trust asymmetry: the source side may be heavily controlled, while the remote side assumes the caller is legitimate because it arrived through an approved database object. That assumption is only safe if the remote account is narrowly scoped and the link is tightly governed.

Common Exposure and Failure Modes

Most problems with database links are governance failures rather than exotic exploits. The most common issues are overprivileged remote accounts, stale links that remain enabled after their business purpose ends, and hidden credential reuse that expands blast radius across environments.

Another frequent failure mode is inventory blindness. Organisations often know a link exists only after an incident or an audit query, which means they cannot easily answer basic questions about who can use it, what it reaches, or whether it still needs to exist.

Misconfiguration can also expose more than intended. A link that is meant for a narrow integration can become a broad bridge if the remote account has excessive table, schema or administrative reach. That turns a single stored definition into a durable pivot point.

For a concrete example of how exposed database trust paths can become a breach driver, see the MongoBleed breach, which shows how database exposure and secret leakage can amplify each other.

Effective control starts with knowing where links exist, who created them and which applications rely on them. From there, the remote identity should be reduced to the minimum required permissions, with no assumption that the source database deserves broad implicit trust.

Review should focus on whether the link is still needed, whether it crosses security domains and whether its credential material is protected to the same standard as any other sensitive secret. Where the link is used for automation or application access, treat it as a governed integration, not a convenience feature.

Teams also benefit from documenting the trust path itself. The practical question is not just whether a link works, but whether the remote database should ever accept that path, and under what monitored conditions it remains justified.

The broader control pattern is well illustrated by Database Links and Linked Servers, which maps how these trust paths store credentials and how to narrow them.

Risk and Threat Considerations

Database links are attractive to attackers because they convert one compromise into a second foothold. If the source database is breached, the link can become a ready-made pivot into the remote environment, especially when the remote account is long-lived or more privileged than the application actually needs.

Failure mechanism: A stored trust relationship lets an attacker reuse legitimate database plumbing to move laterally, query additional data or reach a second database without needing a fresh interactive login.

Impact: The result can be cross-database data exposure, privilege escalation inside the data tier, and a much larger blast radius than the original compromise would otherwise allow.

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 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5AC-3 — Access EnforcementDatabase links depend on enforced remote access decisions and least-privilege use.
IA-5 — Authenticator ManagementLinks often rely on stored credentials that must be managed, rotated and protected.
AU-6 — Audit Review, Analysis, and ReportingLink creation and use need reviewable evidence for discovery and abuse detection.
Recommendation — Restrict linked-database actions to the minimum remote privileges required. Protect and rotate database-link credentials as managed authenticators. Review audit records for link creation, use and anomalous remote access.
CIS Controls v8CIS-5 — Account ManagementDatabase links are tied to privileged accounts that require inventory and governance.
CIS-8 — Audit Log ManagementLogging is needed to detect misuse of stored trust paths and remote queries.
Recommendation — Inventory, review and remove database-link accounts that are no longer needed. Centralize logs for database-link creation and remote execution activity.

Practitioner Guidance

Why practitioners should care: Database links are often created for convenience and then left in place, which means they can silently accumulate risk over time. The important operational judgement is whether each link still has a clear business owner, a current purpose and a remote privilege model that matches that purpose.

Common misunderstanding: Teams sometimes assume a database link is harmless because it is “just an integration.” In practice, it is a standing trust path, so its security posture should be reviewed with the same discipline as any other privileged connection.

Practitioner takeaway: If you cannot quickly explain why a database link exists, what it reaches and who can use it, the link is already harder to defend than it should be.

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.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org