Researchers Detail Two OpenAI Codex Sandbox Escapes

· Original article ↗

Summary

Researchers described Heapjack and Overpatch, two flaws that could bypass OpenAI Codex sandbox restrictions and run commands on a developer’s machine. OpenAI patched both; users should update Codex Desktop or CLI.

Key points

  • Heapjack targeted Codex Desktop’s node_repl component: trusted and untrusted JavaScript contexts shared a Node.js process and memory heap, exposing a token used to access an unsandboxed parent process.
  • Researchers said Heapjack could enable command execution on a developer’s machine when they opened an attacker-controlled repository and asked Codex about its code—even in read-only mode.
  • Overpatch affected Codex CLI’s workspace-write mode. A crafted apply_patch operation could widen write permissions and use a symlink to modify .zshrc outside the project folder.
  • The researchers reported both flaws to OpenAI on August 12; according to the article, OpenAI fixed them within eight days.
  • Users should update to Codex Desktop build 26.818.21641 or later and Codex CLI 0.149.0 or later.

Article Details

Vulnerability Types
  • Sandbox escape through shared-memory access to a trusted token in node_repl
  • Sandbox write-restriction bypass through apply_patch permission handling and a symlink
Exploitation Status
not_reported
Exploit Availability
public_poc
Patch Status
available
Workarounds
  • Update to Codex Desktop build 26.818.21641 or later and Codex CLI 0.149.0 or later.

People

Vendors

Products

Tools

Related Articles