Company Updates

OpenAI patches two critical Codex sandbox escapes, one enabling host command execution

Share
OpenAI patches two critical Codex sandbox escapes, one enabling host command execution

Researchers discovered two critical vulnerabilities in OpenAI's Codex sandbox, one enabling remote code execution on a developer's machine from the most locked-down mode. OpenAI has since patched both flaws.

TL;DR

  • Researchers found two ways to escape OpenAI Codex's sandbox, one allowing command execution on a developer's machine.
  • Both vulnerabilities were reported to and fixed by OpenAI within eight days.
  • The more serious flaw, Heapjack, could run commands on a developer's machine from within Codex's strictest sandbox mode.

What happened

Security researchers at Accomplish AI found two vulnerabilities in OpenAI's Codex sandbox, one of which could run commands on a developer's machine from the most locked-down mode. The more serious flaw, Heapjack, could execute remote code by opening someone else's repository in Codex and asking it a question about the code. The other flaw, Overpatch, could write files outside the intended project folder in workspace-write mode.

Both vulnerabilities were reported to OpenAI on August 12 and were fixed within eight days, according to Oren Yomtov of Accomplish AI. The fixes were included in Codex Desktop build 26.818.21641 and Codex CLI 0.149.0.

Why it matters

These vulnerabilities highlight the importance of robust sandboxing mechanisms in AI coding agents. For developers and startups, this underscores the need for regular updates and vigilance in using such tools. For investors, it emphasizes the critical role of security in the development and deployment of AI technologies.

The competitive angle here is that while OpenAI's Codex is not the only coding agent with sandboxing, the discovery and prompt fixing of these vulnerabilities demonstrate OpenAI's commitment to security. However, it also serves as a reminder that even the most locked-down modes can have vulnerabilities, and continuous monitoring and updating are essential.

Key facts

  • Two vulnerabilities were found in OpenAI's Codex sandbox: Heapjack and Overpatch.
  • Heapjack could run commands on a developer's machine from the most locked-down mode.
  • Overpatch could write files outside the intended project folder in workspace-write mode.
  • Both vulnerabilities were reported to OpenAI on August 12 and fixed within eight days.
  • The fixes were included in Codex Desktop build 26.818.21641 and Codex CLI 0.149.0.
  • Heapjack targeted a component called node_repl, which runs a single Node.js process with two separate JavaScript execution contexts.
  • Overpatch exploited the apply_patch tool to write files outside the intended project folder.
  • Both vulnerabilities shared a common issue: the enforcement mechanism was living inside the thing it was supposed to be enforcing.

Context

OpenAI's Codex is a coding agent available as a command-line tool and a desktop app. Like rival agents, it runs the model's actions inside a sandbox to prevent untrusted code from affecting the wider system. These vulnerabilities highlight the ongoing challenges in maintaining robust security in AI coding agents.

The discovery and prompt fixing of these vulnerabilities demonstrate OpenAI's commitment to security. However, it also serves as a reminder that even the most locked-down modes can have vulnerabilities, and continuous monitoring and updating are essential in the rapidly evolving field of AI.

Topics

Join the discussion

Have a take on this story? Weigh in with our community on Facebook.

💬 Discuss on Facebook →