Skip to main content
Mallory
← Back to News
ai-platform-securityendpoint-software-vulnerabilityprivilege-escalation-method

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 Codex Sandbox Flaws Enabled Malicious Repositories to Execute Host Commands

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
New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

4 events · Aug 2026 – Aug 12, 2026
  1. Reported Sep 21, 20262mo ago

    Researchers disclose Heapjack and Overpatch exploit details

    Accomplish AI described Heapjack's V8 heap-snapshot technique for recovering a trusted authentication token and reaching Codex's privileged host-side parent process, including host command execution in read-only mode. It also detailed Overpatch's controlled patch-path and symbolic-link technique for modifying .zshrc outside the workspace-write boundary.

    OpenAI Codex Sandbox Escape: When the AI Coding Agent Crossed the Security Boundary - TheCyberThrone
  2. Reported Sep 21, 20262mo ago

    OpenAI releases fixes for Codex sandbox flaws

    OpenAI remediated Overpatch in Codex CLI version 0.149.0 and Heapjack in Codex Desktop build 26.818.21641. Both sources state the issues were addressed in under a week after reporting.

    OpenAI Codex Sandbox Flaws Let Malicious Repositories Execute Commands on Host Systems
  3. Aug 12, 20264mo ago

    Overpatch and Heapjack reported to OpenAI

    Researchers reported two Codex vulnerabilities, Overpatch and Heapjack, to OpenAI. The flaws could allow attacker-controlled repositories to escape intended sandbox restrictions and execute host-level actions.

    OpenAI Codex Sandbox Flaws Let Malicious Repositories Execute Commands on Host Systems
  4. Aug 2026

    OpenAI confirms Codex fixes and expands sandbox hardening

    OpenAI confirmed that Heapjack and Overpatch were resolved in August 2026 and said it was implementing additional file-write controls and expanding sandbox testing across platforms.

    Researchers Escape OpenAI Codex Sandbox to Run Commands on Host - CySecurity News - Latest Information Security and Hacking Incidents
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Affected products

2 linked
Codex CliCodex Desktop

Organizations

1 linked
Openai
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.