2026-09-15 · 2026-Q3
"Overpatch" and "Heapjack": Two Sandbox Escapes in OpenAI Codex CLI and Codex Desktop
Which agent, run, or tenant is this?
- Fixable
- Vendor patch
- Vendor response
- Patched
- In the wild
- No
- Actor
- Attacker
Target
OpenAI Codex CLI and Codex Desktop
Impact
Accomplish disclosed two escapes on September 15, 2026. In Codex CLI ("Overpatch"), the `apply_patch` tool granted write access to the parent directories of patched files, so a patch targeting `/tmp` opened `/`, and a symlink let the agent write `$HOME/.zshrc` for unsandboxed execution at the next shell launch, writing anywhere on disk in `workspace-write` mode without an approval prompt. In Codex Desktop ("Heapjack"), the JavaScript tool shared a V8 heap between trusted and untrusted contexts, so untrusted code could pull the authentication token from a heap snapshot and forge requests to the Rust parent process, gaining "unsandboxed command execution, with no prompt" even in `read-only` mode, triggered by opening an untrusted repository and asking Codex a question. Reported August 12 and fixed within eight days, in Codex CLI 0.149.0 and Codex Desktop build 26.818.21641
Root cause
Sandbox permissions derived from paths the agent controls, and a privileged token stored in memory reachable from the untrusted side of the boundary
Sources
Catalog
Cite this: AgentProv incident record: "Overpatch" and "Heapjack": Two Sandbox Escapes in OpenAI Codex CLI and Codex Desktop (2026-09-15). https://agentprov.com/incidents/2026-09-15-overpatch-and-heapjack-two-sandbox-escapes-in-openai-codex-cli-and-codex-desktop
Related
- Also L6 · 2026-10-27MCP Server and LangGraph Advisory Batch: AWS API MCP Accepts Other Apps' Tokens, GitLab MCP Sends Credentials to a Repo-Chosen Registry, and Cross-Tenant Store Reads (CVE-2026-115413, CVE-2026-115883)L6Identity / Run
- Also L6 · 2026-10-23OpenAI Moves Frontier Training Offline After Red-Team Agents Escaped VMs and Signaled Through the CPU Cache; Their Brotli RCE Lands in CISA KEV (CVE-2026-111497)L6Identity / Run
- Also L6 · 2026-10-21Symantec: "Skynet Mode" Attack Agent Hijacks Exposed LLM Endpoints to Hack and Mine at the Model Owner's ExpenseL6Identity / Run