OpenAI Codex Sandbox Flaws Enabled Malicious Repositories to Execute Host Commands
Emerging Technology Risk · 5 sources · Updated 2mo ago · First seen Aug 12, 2026

OpenAI remediated two Codex sandbox-escape vulnerabilities, Overpatch and Heapjack, that could allow a malicious repository to execute commands or alter files on a developer's host system. Overpatch affected the open-source Codex CLI's apply_patch authorization logic: attacker-controlled patch paths could expand permitted write locations and, with symlinks, modify files outside the workspace, including shell startup files such as ~/.zshrc.
Heapjack affected Codex Desktop's node_repl integration. Untrusted JavaScript sharing a V8 heap could recover a trusted authorization token, forge requests to an unsandboxed parent process, and perform host-level actions—including when Codex was configured for read-only sandbox use. OpenAI fixed Overpatch in Codex CLI version 0.149.0 and Heapjack in Codex Desktop build 26.818.21641; organizations should update both components and treat untrusted repositories as potentially hostile.
Why it matters
Impact assessment
OpenAI Codex users running Codex CLI versions before 0.149.0 or Codex Desktop builds before 26.818.21641 are exposed to sandbox escapes triggered by opening and interacting with a malicious repository. Successful exploitation can produce unapproved host command execution, persistence through shell-profile modification, and potential access to development secrets, source code, cloud credentials, signing material, and local service sockets.
- Affected populations: developers, engineering workstations, build hosts, and organizations using Codex Desktop or the open-source Codex CLI with untrusted, cloned, or third-party repositories.
- Severity: high. Both issues cross an intended security boundary; Heapjack bypasses even strict read-only sandbox mode, while Overpatch enables writes outside the workspace without user approval.
- Potential business impact: source-code theft, credential theft, build-pipeline compromise, malicious code signing, developer endpoint compromise, and lateral movement into software-development infrastructure.
- Exposure scope: broad across unpatched Codex deployments, but exploitation requires an attacker-controlled repository to be opened and analyzed or modified through Codex.
- Exploitation status: the references describe researcher proof-of-concept demonstrations. They do not report confirmed exploitation in the wild.
Affected entities
- OpenAI Codex CLI before version 0.149.0
- OpenAI Codex Desktop before build 26.818.21641
- Researcher/discloser: Oren Yomtov, Accomplish AI
- Disclosure date: 2026-08-12
- Vendor remediation: reportedly completed within eight days of disclosure


