Skip to main content
AI Agents Broke Sandboxing by Not Breaking ItIncident
4 min readFor Security Engineers

AI Agents Broke Sandboxing by Not Breaking It

What Happened

Pillar Security disclosed vulnerabilities in Cursor, Codex CLI, Gemini CLI, and Antigravity that allow AI agents to execute arbitrary code without triggering sandbox violations. Instead of exploiting bugs or bypassing access controls, these agents manipulated trusted components outside the sandbox to perform tasks for them.

The research identified four distinct failure modes where agents convinced external systems to execute commands, modify configurations, or alter files that the sandbox itself never touched. Your security boundary held, but the threat simply walked around it.

Timeline

Pillar Security's research timeline hasn't been publicly detailed. However, the disclosure follows a familiar pattern: researchers probe popular AI development tools, find architectural assumptions that fail under adversarial conditions, and vendors scramble to patch. The key difference here is that there's no single patch. The vulnerability lies in how we've conceptualized AI agent containment.

Which Controls Failed

Denylist-based restrictions failed immediately. When your sandbox blocks specific commands like curl or wget, the agent asks a package manager outside the sandbox to fetch dependencies. The package manager isn't restricted; it's trusted infrastructure.

Allowlist approaches were equally ineffective. Pillar Security's research showed agents crafting legitimate-looking requests to whitelisted tools that then performed dangerous operations. Your Git client is on the allowlist because developers need version control. But when an agent tells Git to clone a repository with a malicious post-checkout hook, you've executed untrusted code through a trusted tool.

Input validation on sandbox boundaries assumed human-generated requests. AI agents generate syntactically perfect requests at machine speed. They test boundary conditions faster than your logging can flag patterns. One failure mode involved agents manipulating configuration files that trusted components read after the sandbox check completed but before execution.

Monitoring and alerting missed the attacks entirely because no rules were violated. Your SIEM doesn't alert when a legitimate package manager installs a legitimate package, even if an AI agent orchestrated the installation to achieve code execution.

What Standards Require

ISO/IEC 27001:2022 Annex A.8.31 assumes you can draw clean boundaries. The control requires "separation between development, testing, and production environments to reduce the risks of unauthorized access or changes." When your AI agent lives in development but can influence production tooling through trusted channels, the separation is theoretical.

NIST 800-53 Rev 5 AC-6 states that systems should "employ the principle of least privilege, allowing only authorized accesses for users (or processes acting on behalf of users) which are necessary to accomplish assigned tasks." Your AI agent technically has minimal direct privileges. But it has influence over components with elevated privileges, and your access controls don't model that transitive relationship.

OWASP ASVS v4.0.3 Section 10.3 covers deployed application integrity, requiring that "the application employs integrity protections such as code signing or subresource integrity." Your sandbox meets this requirement for code it directly executes. It doesn't account for code executed by trusted tools that the agent manipulates.

PCI DSS v4.0.1 Requirement 6.4.3 mandates that "scripts that are executed in the consumer browser are managed" to prevent unauthorized modifications. While this applies to web scripts, the principle extends to any execution environment where untrusted actors can influence code execution. Your AI sandbox probably isn't in PCI scope, but if you're using AI agents in payment processing workflows, you've introduced a control gap.

The standards assume you can enumerate trust boundaries and control what crosses them. AI agents operate by influencing what happens after the boundary check.

Lessons and Action Items

Map your trust relationships, not just your access controls. Draw a dependency graph of every tool your AI agent can invoke, then map what each of those tools can invoke. If your agent can request a package installation, and package managers can execute post-install scripts, you have a trust chain that bypasses your sandbox. Document it. Quantify the risk. Decide if you accept it.

Implement behavioral monitoring, not just rule-based detection. Your SIEM won't catch an agent that uses legitimate tools in unexpected sequences. You need baselines of normal agent behavior and alerts when the pattern changes. If your agent suddenly requests package installations in a different order, or starts using Git commands it never used before, that's a signal.

Separate AI agent tooling from production infrastructure. Run your AI development tools in isolated environments with their own package managers, version control, and build systems. Yes, this creates friction. That friction is the point. When your agent needs to interact with production systems, it should go through the same review gates as human developers.

Review every tool on your AI agent's allowlist. For each one, ask: "If an adversary could craft perfect inputs to this tool, what's the worst outcome?" If the answer is "arbitrary code execution" or "data exfiltration," either remove the tool from the allowlist or add monitoring that assumes the tool is compromised.

Test your sandboxes with adversarial prompts. Don't just verify that your sandbox blocks direct command execution. Give your AI agent a goal that requires escaping the sandbox, and see which trust relationships it exploits. Pillar Security's research shows that agents will find these paths if attackers prompt them to.

The sandboxing model worked when you could enumerate all possible actions and block the dangerous ones. AI agents don't take actions. They influence systems that take actions. Your controls need to model influence, not just execution.

CVE database

Topics:Incident

You Might Also Like