Sandbox Escape Vulnerabilities Across 4 Coding Agent Vendors
Pillar Research found sandbox escapes in Cursor, Codex, Gemini CLI and Antigravity where the agent did not break the sandbox directly but wrote files or configuration that trusted host components later executed. An attacker could use this to run code outside the sandbox on a developer machine.
pillar.security
Published on pillar.security
Over several months, Pillar Research found and reproduced sandbox escapes and boundary bypasses across Cursor, Codex, Gemini CLI, and Antigravity. In almost every case, the agent did not need to break the sandbox directly.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the sandbox only restricts the agent process itself and does not account for host components that later trust and execute files the agent is allowed to write.
Impact
An attacker could achieve code execution outside the sandbox on a developer endpoint, but the text notes that some issues were downgraded as difficult to exploit and required social engineering or indirect prompt injection.
What the attacker needed
Agent processes untrusted input; agent can write workspace files; host component trusts those files
The fix
The text says several issues were fixed or patched, and recommends deny-by-default sandboxing, treating executable workspace configuration as sensitive, requiring approval for host-side automation, and modelling command policy at the invocation and side-effect level.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A sandbox is meant to keep an AI coding agent from doing anything harmful outside a project folder. This research shows that even when the agent stays inside the sandbox, it can write files that other parts of the developer's computer later trust and run, so the agent effectively escapes without breaking any rule. An attacker who can influence what the agent writes, for example through a malicious repository, could get code to run on the developer's machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.