Subscribe to the Non-Human & AI Identity Journal

Containment Failure

A breakdown in isolation that allows a system to interact with real environments, data, or tools when it was meant to stay constrained. In AI security, containment failure is often caused by networking, integration, or review gaps rather than model behaviour alone.

Expanded Definition

Containment failure describes the moment a constrained system escapes its intended boundary and begins interacting with real data, live tools, external services, or production environments. In NHI and agentic AI security, that boundary may be technical, procedural, or both: network egress controls, tool permissions, approval gates, sandboxing, and human review all contribute to containment. The term is used most precisely when the system was designed to be isolated but the isolation failed, not when the system was simply deployed too broadly.

Definitions vary across vendors, especially where “containment” overlaps with sandbox escape, unsafe tool use, or privilege misuse. For a governance baseline, the NIST Cybersecurity Framework 2.0 is helpful because it frames the operational need to protect systems, data, and service boundaries consistently. In practice, containment failure often emerges from integration drift: an agent receives a new connector, a workflow gains network access, or a review step is bypassed without revalidating the original safety assumptions. The most common misapplication is treating any unexpected model output as containment failure, which occurs when the system is still isolated but the output itself is merely unsafe or incorrect.

Examples and Use Cases

Implementing containment rigorously often introduces latency, workflow friction, and engineering overhead, requiring organisations to weigh fast automation against the cost of stronger boundary controls.

  • An internal AI agent is allowed to draft tickets, then a newly added plugin quietly enables direct writes to a production system, turning a sandboxed workflow into a live operational path.
  • A code assistant in a restricted environment receives broader network access during a routine update, and the change is never re-reviewed against the original trust assumptions.
  • An enterprise chatbot linked to secrets stores or SaaS APIs begins returning live records because its service account was granted permissions intended only for testing.
  • As discussed in the DeepSeek breach, exposure can become consequential when data, credentials, or infrastructure are reachable outside the intended boundary.
  • Threat research on LLMjacking: How Attackers Hijack AI Using Compromised NHIs shows how compromised identities and exposed credentials can collapse an AI system’s assumed isolation.

Why It Matters in NHI Security

Containment failure matters because NHIs rarely fail in the abstract. They fail through over-privileged tokens, permissive connectors, weak egress restrictions, and missing oversight on autonomous actions. Once containment breaks, an agent can move from suggestion to execution, from simulated access to real access, and from test data to sensitive production records. That shift is especially dangerous in NHI security because identities, secrets, and tool permissions are often distributed across platforms, making blast radius larger than teams expect.

NHIMG research on the State of Secrets in AppSec found that only 44% of developers follow security best practices for secrets management, and leaked secrets can take an average of 27 days to remediate, which gives containment failures time to compound. The same research also notes that 43% of security professionals worry AI systems may learn and reproduce sensitive patterns from codebases, highlighting how containment can fail even before a tool is explicitly invoked. Organisationally, this becomes visible only after an agent has already touched systems it was never meant to reach, at which point containment failure is no longer theoretical but operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A03 Agentic AI guidance addresses unsafe tool use and boundary failure in autonomous systems.
OWASP Non-Human Identity Top 10 NHI-05 NHI controls cover excessive access and boundary collapse through compromised identities.
NIST CSF 2.0 PR.AC-4 Least-privilege access management is central to preventing boundary escape.
NIST Zero Trust (SP 800-207) SC-7 Zero Trust emphasizes controlled communications and trust verification at boundaries.
NIST AI RMF AI risk management covers operational controls that limit unintended system behavior.

Limit every agent and service account to the minimum access needed for the approved workflow.