(0Day) OpenAI Codex Sandbox Escape Vulnerability
A sandbox escape vulnerability in OpenAI Codex allows an attacker to bypass the sandbox and execute code as the current user when Codex processes a repository containing malicious JavaScript. The flaw stems from insufficient isolation of the JavaScript execution environment.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to bypass the sandbox on affected installations of OpenAI Codex. User interaction is required to exploit this vulnerability in that the target must use Codex to process a repository containing malicious JavaScript.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the JavaScript execution environment did not properly isolate the sandboxed context, allowing escape.
Impact
An attacker could bypass the sandbox and execute code in the context of the current user, but user interaction (processing a malicious repository) is required.
What the attacker needed
Victim uses Codex to process a malicious repository
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A sandbox is a security mechanism that keeps code isolated so it cannot harm your computer. Here, the sandbox in OpenAI Codex was not strong enough, so a malicious JavaScript file inside a repository could break out and run code on the user's machine. The attacker needs the victim to open a specially crafted repository with Codex.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.