Est.

AI Security Tool Deployment in Isolated Tenant Infrastructure

Container isolation fails when AI agents generate and execute untrusted code.

· 11 min read · Updated
Cover illustration for “AI Security Tool Deployment in Isolated Tenant Infrastructure”
AI in Enterprise Security · September 7, 2026 · 11 min read · 2,552 words

Deploying AI security tools in shared, multi-tenant infrastructure requires a layered defense built from runtime sandboxing, memory isolation, scoped credentials, and per-tenant rate limiting, because the container boundaries that protect ordinary SaaS platforms do not hold for agentic workloads. An AI agent generates and runs its own code at the moment of use, and no standard isolation model was built to contain code the platform itself never reviewed.

Why standard container boundaries fail for agentic AI workloads

Traditional multi-tenant SaaS keeps customers apart at the application layer. Separate database rows, separate API keys, and role-based access control have worked for two decades because the platform, not the customer, decides what code runs on its servers. That assumption is the entire foundation of application-layer isolation, and agentic AI breaks it.

When an AI agent takes a customer prompt, it writes code, then runs it, often inside the same shared compute pool as every other customer's agent. The platform never reviewed it, never approved it, and has no prior basis for trusting it. OWASP's guidance on LLM applications states the right posture directly: treat the model as any other user, and validate everything it produces. That instruction matters because it reclassifies the agent itself as an untrusted actor sitting inside the trust boundary, not a vendor-controlled process running on the vendor's behalf.

When execution pools are shared across tenants, the failure of any one tenant's isolation becomes everyone else's problem. A runaway process or a successful exploit against one customer's agent does not stay contained to that customer. So every other tenant scheduled onto that same node ends up with degraded latency, denial of service, or an outright breach.

Standard containers were not built to stop this, because they share the host kernel with every other container on the machine. Kubernetes' own documentation is direct about the limits of this design: it describes containers as offering a weaker isolation boundary than hardware-based virtual machines. That weaker boundary is not a hypothetical concern. The runc container runtime, used widely across container platforms, has produced high-severity escape vulnerabilities more than once: CVE-2019-5736 and CVE-2024-21626 both carried CVSS scores of 8.6, and each gave an attacker a path across what was supposed to be a hard tenant boundary. The CNCF's analysis of the runc breakouts disclosed in November 2025 warned that the flaws pose a critical risk specifically in multi-tenant environments where users define their own containers or run images nobody vetted, and that describes the exact operating condition of an agentic AI platform.

The amplification comes from what agents are actually permitted to do. An agent with tool access can touch the file system, browse the web, execute code, and call external APIs, and each of those capabilities multiplies the damage a successful sandbox escape can cause. A single namespace escape inside a code-execution sandbox does not just compromise one process; it can reach the host and every other tenant sharing that node. More than half of enterprise AI agents run today with no security oversight or logging at all, HiddenLayer's 2026 AI Threat Landscape Report found. That same report found that an agentic system is involved in 1 of every 8 reported AI security breaches. Those two figures describe the same gap from different angles: broad deployment of agents with tool access, paired with weak visibility into what those agents are doing once they start executing.

The attack surface of agent code execution and tool calls

Three documented patterns dominate real-world attacks on agentic systems: prompt injection, supply chain compromise, and identity-provider abuse. What connects all three is a shared prerequisite. None of them work if the execution environment enforces a hard boundary around what the agent can reach once it has been manipulated. If that boundary is missing, a single successful foothold spreads laterally through the rest of the system. 80% of organizations have encountered improper data exposure or unauthorized system access caused by AI agent behavior.

The EchoLeak vulnerability, tracked as CVE-2025-32711 and disclosed against Microsoft 365 Copilot, shows how far a single crafted input can travel when execution boundaries are missing. One email, and no user interaction was required, triggered zero-click exfiltration of sensitive data. The attack chain worked by bypassing Microsoft's cross-prompt injection classifier, then evading link redaction filters using reference-style Markdown formatting, then exploiting images the system auto-fetched, and finally abusing a trusted Teams proxy domain to escalate privilege past the client-side content security policy. Each step defeated a different application-level filter. None of those filters was a kernel-enforced execution boundary, and that is what let the chain run end to end.

A separate case illustrates a different failure point: the subprocess. Google's Antigravity agent platform includes a "Secure Mode," its highest security setting, and that mode was bypassed through its own find_by_name tool. The tool executed the underlying fd binary as a subprocess, and it did so before the agent's security restrictions were evaluated against that action. The application-level control that was supposed to stop unauthorized file access never had the chance to run, because the subprocess operated outside the boundary the control was watching. CVE-2025-59528, which carries the maximum possible CVSS score of 10.0, demonstrates the same underlying lesson from a different vulnerability: application-level security controls fail whenever the execution environment beneath them is not itself isolated.

The subprocess gap and the secrets inheritance gap are the two failure modes that production teams underestimate most consistently. The subprocess gap is what broke Antigravity's Secure Mode: application-level security policies typically do not govern subprocesses spawned by native tool invocations, so a tool that shells out to a binary can sidestep every policy written at the application layer. Only isolation enforced at the kernel level keeps that subprocess inside the boundary regardless of what the application layer thinks it is doing.

The secrets inheritance gap is a quieter failure, but just as serious. An agent that runs unsandboxed typically inherits the full credential environment of its host process and can reach every API key, every cloud role, and every database connection string available to that process, whether or not the current task has any legitimate need for them. NVIDIA's 2026 guidance names the fix directly: inject secrets per task rather than letting the agent inherit the full host environment. That is least privilege, translated into operational terms for agentic workloads specifically.

A fourth attack surface sits below the agent layer entirely, inside the shared inference infrastructure. Platforms that run a single LLM inference cluster across multiple tenants face a choice about KV-cache sharing: allow it, and accept a timing side channel that can leak information across tenant boundaries, or disable cross-tenant sharing and give up some of the efficiency gain the shared cache was built to provide. Prompt injection and subprocess escapes get more attention, but this threat operates at a layer none of the application-level fixes above can reach.

The four isolation layers that together constitute an adequate boundary

Diagram: Four Isolation Layers — and What Each One Closes. Visualizes: Show four stacked layers, each paired with the specific failure mode it closes and a real-world example.

Sandboxing is a stack of four independent boundaries, each closing a different failure mode described above, and all four need to be present at once for the architecture to hold.

The first is network egress control. An unsandboxed agent can call any endpoint its host can reach, which is precisely the mechanism EchoLeak used to exfiltrate data once it escalated privilege. A sandboxed agent instead operates under a tightly scoped allowlist, enforced through an egress proxy or a network policy, with every other outbound destination flagged for alerting rather than allowed silently. NVIDIA's 2026 guidance gets specific about how to enforce this: it recommends HTTP proxy controls along with address- and port-based restrictions. So if an attacker injects a prompt that tries to exfiltrate data to an attacker-controlled endpoint, this layer stops it, because the prompt cannot reach a destination the egress policy has not allowed.

The second layer is the filesystem boundary, and here the risk is write access to configuration files that execute automatically. NVIDIA's guidance calls for blocking writes to configuration files no matter where they sit, because those writes can be used to exploit hooks, skills, or local MCP configurations that run outside the sandbox context entirely, and that holds regardless of what approval level the user has granted.

The third layer is process isolation, which would have stopped the Antigravity Secure Mode bypass. Subprocesses spawned by native tool invocations have to stay inside the sandbox boundary, and application-level policy alone does not reach them. Only isolation enforced at the kernel level, below the application, can guarantee that a subprocess cannot step outside the boundary the rest of the policy stack assumes it is operating within.

The fourth layer is secrets scoping: the agent receives only the credentials its current task actually requires, provisioned at runtime and revoked the moment the task completes. This is the direct fix for the secrets inheritance gap, and it turns the abstract principle of least privilege into a concrete runtime pattern built specifically for agentic systems.

A fifth control, per-tenant rate limiting, sits outside this stack, but it still belongs in the architecture. It is operational hygiene rather than an isolation boundary in the same sense as the four above. If one agent gets caught in an infinite loop, it can starve a shared pool's CPU, and every other tenant on that pool ends up with degraded performance, even though none of their own agents did anything wrong. If you apply token-bucket rate limiting per tenant, you decouple one tenant's runaway workload from every neighbor's performance, and it also constrains prompt injection attacks that try to turn the agent into a high-volume API caller.

None of these five controls substitutes for another. Strong secrets scoping does nothing to stop a subprocess escape. A tight egress allowlist does nothing to stop an agent that has inherited the full host credential set. Each of the four isolation layers was built to close a specific gap the others were never designed to cover, so removing any one of them leaves the remaining three meaningfully weaker.

Choosing the right isolation technology: Firecracker, gVisor, and V8 Isolates compared

The four-layer architecture tells a team what the boundary needs to do. It does not answer which underlying technology should enforce the process isolation layer, because that choice depends on threat model, data classification, and performance requirements, not on any single technology being generically better than the others.

Firecracker microVMs are at the strong end of this spectrum. Each workload gets its own guest kernel, enforced through hardware virtualization via KVM, so a kernel exploit inside one microVM has no path to the host or to any neighboring tenant. That used to come at a real performance cost, but Firecracker's current numbers remove the old objection to running one VM per tenant: boot time of 125 milliseconds or less, and under five MiB of memory overhead per VM. The best fit for Firecracker is regulated data and any workload that executes arbitrary AI-generated code, which is to say, most agentic workloads with real tool access. AWS Bedrock AgentCore runs each user session in its own dedicated microVM, with isolated CPU, memory, and filesystem, and both E2B and Vercel build their isolation layer on Firecracker microVMs as well.

gVisor takes a different approach, working at the syscall level rather than through full hardware virtualization. It intercepts and filters the application's syscalls where user space meets the kernel, so you get defense-in-depth isolation without paying for a dedicated guest kernel per workload, and it works with any programming language, not just a narrow set. The best fit for gVisor is compute-heavy multi-tenant workloads where the overhead of a microVM per tenant is a real constraint on cost or throughput. Modal runs its secure sandboxed execution at scale on gVisor containers.

V8 Isolates sit at the narrow end of the spectrum. They apply only to JavaScript and WebAssembly, running as separate in-process execution contexts rather than separate processes or separate kernels, which gives them the lowest latency and the lowest overhead of the three options. The best fit is latency-critical, lightweight tasks where the workload is confirmed to be JavaScript only, and that qualifier is a hard constraint rather than a preference. V8 Isolates do not apply to polyglot agent workloads or to arbitrary code execution, so a platform running mixed-language agents with broad tool access cannot rely on them as the primary isolation layer.

The practical answer for platforms that mix workload types is a tiered model rather than a single choice. Trusted workloads, meaning platform-written background jobs that never touch untrusted input, can run in ordinary containers. Untrusted workloads, meaning customer-facing agents executing arbitrary code, run in microVMs. An orchestration layer routes each workload to the right tier based on its trust classification, so you do not force every workload through the same isolation technology regardless of what it actually needs. This tiering also controls the economics of the architecture: stronger isolation costs more per tenant but shrinks the blast radius of any single compromise down to one workload, while weaker isolation costs less but leaves a shared kernel surface exposed across more of the fleet. Neither choice is free, and the right split between tiers is the real engineering decision here, not which single technology to standardize on.

Credential scoping, memory isolation, and VPC perimeters that close the remaining gaps

A correctly chosen isolation technology, running all four layers described above, still leaves gaps open if credentials, memory, and network egress are not scoped on a per-tenant basis. Each of these three surfaces sits outside the execution sandbox itself. No amount of microVM or gVisor hardening closes them on its own.

Credential exposure is the clearest case. The secrets scoping layer inside the sandbox handles what a given task can access during execution, but the credential vaulting system behind it has to issue genuinely separate, per-tenant scopes rather than a single shared credential set partitioned by convention. An agent that can reach another tenant's cloud role or database connection string has defeated the isolation architecture without ever touching the sandbox boundary, no matter how well the sandbox itself was built.

Memory isolation carries the same logic into the retrieval and embedding layer. Platforms that store tenant data in a shared vector index need genuine namespace or database-level separation between tenants, not filtering applied only at query time. If a retrieval system filters results by tenant ID only after search, without enforcing separation before it, one tenant's data can surface in another tenant's context window under the right query conditions.

Network-level exfiltration is the third gap, and it sits alongside but outside the egress allowlist built into the sandbox. A network perimeter around each tenant's compute, combined with the egress proxy described earlier, gives the architecture two independent checks on outbound traffic rather than one: the sandbox's own allowlist, and a network-level perimeter that would catch traffic even if the sandbox's policy were somehow bypassed or misconfigured. Layering these two checks rather than relying on either alone reflects the same principle that runs through the whole architecture: no single control, however well built, is sufficient on its own. The isolation stack holds because each layer backs up the one beside it, and because none of the four core layers, nor the credential, memory, and network perimeters around them, was ever meant to carry the whole boundary by itself.

Sources

  1. Multi-tenant AI agent isolation for SaaS platforms
  2. Best Sandbox Infrastructure for Multi-Tenant AI Apps in 2026
  3. AI Agent Sandboxing: Enterprise Security Guide 2026

More in AI in Enterprise Security