Recently, security researchers disclosed sandbox escape vulnerabilities discovered within Codex. Attackers do not need to directly breach the underlying isolation restrictions. Instead, they can exploit Codex’s inherent tools and trust boundaries to write files or execute high-risk, unapproved commands on the host machine. These critical flaws were officially reported to the OpenAI team on August 12, 2026. Importantly, users who update to the latest versions remain entirely unaffected by these exploits.
Track every CVE that hits your stack the moment it's exploited.
Get free email alertsBypassing File Write Restrictions
This specific issue resides within the patching utility of the Codex CLI. By default, Codex strictly restricts file writing operations to the current workspace. However, researchers discovered that specially crafted patch contents could artificially expand the tool’s writing privileges. As a result, attackers could ultimately compromise files located entirely outside the designated workspace.
Under specific conditions, an attacker could leverage mechanisms like symbolic links to redirect write operations originally confined to the project directory into the user directory or other sensitive locations. Furthermore, this entire attack sequence might not trigger any additional authorization prompts for the victim. Fortunately, developers resolved this issue in the Codex CLI version 0.149.0, released on August 21, 2026. Users updating to this version or subsequent releases achieve complete immunity against this vulnerability. The current latest version is 0.155.1.
Bypassing Strict Read-Only Mode
Another severe vulnerability involves the Node.js tool installed alongside the Codex desktop edition. This utility simultaneously executes trusted code and untrusted code generated by the AI agent. Crucially, both trusted and untrusted scripts share a portion of the process memory space.
Untrusted code possesses the opportunity to extract authentication tokens directly from this shared memory. Subsequently, it can forge requests and submit them to external native programs for processing. Because these external programs can launch applications, connect to local Unix sockets, or modify global configuration files, an attacker could ultimately shatter the Codex sandbox boundaries.
Researchers noted that this exploit triggers even under the most stringent read-only mode, and the attack requires absolutely no manual user approval. A user merely needs to open a repository containing malicious content. As a result, the repository author can manipulate agent behavior through prompt injection. You can read the full technical breakdown detailing the process of escaping the OpenAI Codex sandbox twice for deeper insights into the attack vector.
Developers successfully patched this critical flaw in Codex Desktop version 26.818.21641 and newer releases. We strongly advise users to upgrade regularly to the latest versions. Otherwise, avoid utilizing outdated software for extended periods, as publicly disclosed vulnerabilities will continuously degrade your system security.
Support Our Threat Intelligence
Find our vulnerability reports and weekly recaps helpful? Support our work today and unlock a 100% ad-free reading experience!