An AI agent sandbox limits what a coding agent can reach, but it does not stop an attacker from steering the agent through the data it reads. Security researchers say a single fake error report was enough to take over AI agents at more than 100 companies, including agents running inside sandboxes, one of them with its network switched off.
The finding matters because sandboxes are now the default safety layer for agents that run code on employee laptops and in CI pipelines.
How one fake error report took over agents
The research, called agentjacking, starts with a public Sentry DSN. That key sits in frontend JavaScript by design and can only write events, never read them. An attacker uses it to submit a crafted error event that looks like any other crash report, complete with a stack trace.
Some time later a developer tells their coding agent to work through open Sentry issues. The agent retrieves the event via the Sentry MCP server, takes the planted text as advice and executes the attacker’s package from the public npm registry under the developer’s own privileges.
Every step is authorized. The agent may read errors, may run packages and may use the developer’s environment, so endpoint detection, web application firewalls, identity tools, VPNs and firewalls see nothing unusual. The researchers call this the Authorized Intent Chain. They ran it as a controlled experiment, disclosed everything to the affected vendors, took no data and made every payload identify itself as a security scan.

Why the sandbox saw nothing wrong
A sandbox decides what an agent can access. It cannot tell whether an action serves the user or an outsider. The attack never had to break out of anything: the payload arrived as an ordinary error report, and the agent then ran a normal package manager command inside its own permissions.
The CI case shows it clearly. One OpenAI Codex agent in a CircleCI pipeline on EC2 had its network switched off, and the researchers got to it anyway. The network rule governed outbound connections. Input was another matter, and the input was the attack.
Credentials made things worse. A Claude Code instance on macOS held a working AWS secret key in its environment. Under WSL, an SSH agent socket was exposed. Agents sitting behind a VPN could get at live cloud and cluster credentials, since they were already past the boundary.
Better prompting won’t fix this. An agent can’t reliably separate data from instructions. OpenAI said in December 2025 that prompt injection against its ChatGPT Atlas browser agent is “unlikely to ever be fully ‘solved’.”

Vendor sandboxes have been escaped too
OpenAI’s Codex defaults to a layered setup. It offers read-only, workspace-write and danger-full-access modes, keeps the network off in workspace-write, protects the .git, .codex, .agents and .aws directories, and asks before editing outside the workspace. OpenAI’s own documentation lists prompt injection, secret exfiltration and malicious dependencies as risks of giving an agent internet access.
The Cloud Security Alliance documented two Codex escapes in September 2026. In one, a patch delivered through a symlink wrote into .zshrc, and every later terminal session then executed that tampered file with no sandbox around it. Version 0.149.0 fixed it.
Anthropic’s Claude Code uses Linux bubblewrap and macOS Seatbelt, combining filesystem and network isolation. Anthropic says sandboxing cut permission prompts by 84% in internal use. SecurityWeek covered two bypasses of its network sandbox. One used a hostname containing a null byte, which cleared the allowlist even though the connection landed on another host.
Seven issues disclosed in July 2026 spanned Cursor, Codex CLI, Gemini CLI and Antigravity. According to the Cloud Security Alliance, none broke the sandbox. Each abused what happened to the agent’s output after it left the sandbox. The analysis sorts the failures into four patterns:
- Sandbox profiles written as denylists miss operating system primitives.
- Hooks, task files and interpreters stored in the project are trusted by default.
- Command allowlists check the command name but not its arguments.
- Reaching a privileged local daemon sidesteps the sandbox altogether.
What security teams can do
The researchers’ advice starts from the assumption that an agent will sometimes follow an instruction it shouldn’t.
- Execute agent commands inside an operating-system or container sandbox, confine writes to the workspace, and make agent settings and cloud credential folders read-only.
- Deny outbound network by default. Where it is needed, allow named domains and only GET, HEAD and OPTIONS requests. The team calls this the most effective baseline control it found.
- Don’t expose the Docker socket or the SSH agent socket to agents.
- Replace long-lived keys with short-lived credentials scoped to a task, and keep the agent that reads untrusted data apart from the one that can deploy.
- Regard telemetry, issues, pull request comments and READMEs as untrusted input.
- Log every tool call, process and network connection, alert on packages an agent has never run, and keep a kill switch.
Approval prompts make a weak control. Anthropic built sandboxing because users tire of approving things, and Codex can run with approvals disabled, which leaves only the sandbox.
What to watch next
Sandbox configuration changes with every new tool, credential and agent release, so a single review goes out of date quickly. The researchers recommend regularly replaying real attacks, an injected error report for example, against your own agents. One cheap test: put a hostile instruction in a dummy ticket or error feed and watch what your agents do.
Sandboxes remain a sound baseline and are far better than no controls. They just answer a different question from the one agentjacking raises, which is whether the agent should run this command right now.
Source: Tenet Security