Pillar Security demonstrates sandbox escapes in four AI coding agents

· Original article ↗

Summary

Pillar Security demonstrated sandbox escapes in Cursor, Codex CLI, Gemini CLI and Antigravity using workspace files that trusted host tools later executed or scanned. Several flaws were patched; Google downgraded two Antigravity findings.

Key points

  • Pillar Security says prompt injections in workspace content can lead an agent to write files that trusted tools outside the sandbox later execute, load, or scan.
  • The researchers grouped seven findings into four failure modes: denylist gaps, executable workspace configuration, command allowlists that trust command names, and privileged local daemons.
  • A workspace-controlled Cursor hook configuration enabled unsandboxed command execution; the issue is tracked as CVE-2026-48124 and was fixed in version 3.0.0.
  • Other Cursor findings involved an editor Python extension running an agent-modified virtualenv interpreter and Git metadata tricks that bypassed path-based rules; the Git issue was patched in version 3.0.0, with a CVE pending.
  • A Codex CLI allowlist flaw treated git show as safe based on its name; OpenAI patched it in version 0.95.0. A Docker socket issue affecting Codex, Cursor, and Gemini CLI was also fixed.
  • According to Pillar Security, Google downgraded two Antigravity findings involving a macOS Seatbelt denylist bypass and a Secure Mode task-configuration bypass, citing social engineering or user trust of a repository as barriers to exploitation.
  • Pillar recommends monitoring when trusted local tools run files written by an agent, rather than relying only on banned filenames.

Article Details

Attack Vectors
  • Prompt injection in workspace content such as a README, issue, dependency, or diff could cause an AI coding agent to write files that trusted tools outside the sandbox later execute or scan.
  • A workspace-controlled Cursor hook configuration enabled unsandboxed command execution.
  • An agent could modify a virtualenv interpreter that the editor's Python extension later executed during discovery.
  • Git metadata outside a folder named .git could trigger execution through fsmonitor and bypass Cursor's path-based rules.
  • Codex CLI's command allowlist trusted git show by name even when the invocation was not read-only.
  • A reachable Docker socket exposed a privileged local daemon that could run code outside the agents' sandboxes.
  • Antigravity's macOS Seatbelt denylist and Secure Mode were bypassed through a task-configuration file; Google reportedly judged the findings difficult to exploit because they required social engineering or trust in a repository carrying an indirect prompt injection.
Defensive Notes
  • Pillar Security recommended monitoring when a trusted local tool runs content written by an agent, rather than relying only on banned filenames.
  • Cursor fixed the hook issue and the Git metadata issue in version 3.0.0.
  • OpenAI patched the Codex CLI command-allowlist issue in version 0.95.0.
  • The article reports that the Docker socket issue was fixed; it does not specify a version.
  • Google downgraded both Antigravity findings, while Pillar reported that Google still rated one report as being of exceptional quality.

MITRE ATT&CK

CVE

People

Vendors

Products

Related Articles