(Pwn2Own) OpenAI Codex GUI OpenProjectInCodex Argument Injection Remote Code Execution Vulnerability
The OpenProjectInCodex context menu command in OpenAI Codex fails to validate a user-supplied string before using it to build command-line arguments. An attacker can exploit this to execute arbitrary code as the current user when the target opens a malicious file.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of OpenAI Codex. User interaction is required to exploit this vulnerability in that the target must open a malicious file.
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 OpenProjectInCodex command passes an unvalidated user-supplied string into command-line arguments, allowing argument injection.
Impact
An attacker could execute arbitrary code in the context of the current user, but the target must open a malicious file.
What the attacker needed
Target opens a malicious file
The fix
OpenAI issued an update to correct this vulnerability.
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.
This is an argument injection bug. A program builds a command line from text it does not check, so an attacker can slip in extra options that make the program run harmful commands. The victim only has to open a crafted file for the attacker's code to run with the victim's permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.