CVE-2026-19591: OpenAI Codex CLI (Windows, macOS, Linux) vulnerability
OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS misclassified certain PowerShell commands as safe because their command-safety parser interpreted PowerShell's stop-parsing token (--%) differently than PowerShell itself. If a user opens an attacker-prepared repository and Codex follows its instructions, Codex can run a file-writing Git command without requesting user approval. On macOS and Linux, exploitation additionally requires separately installed PowerShell Core (pwsh) to be invoked. If filesystem protections permit the write, the command can modify Codex's configuration. If Codex later loads the modified configuration, it can launch an attacker-controlled MCP server and execute code with the user's privileges, allowing it to read, change, or delete files accessible to that account. The approval bypass does not disable filesystem sandboxing; the default filesystem sandbox on macOS and Linux can prevent writes outside permitted locations.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
OpenAI Codex CLI (Windows, macOS, Linux)to a version that resolves this vulnerability.Fixed in 0.131.0 - Upgrade
Upgrade
Codex Desktop (macOS)to a version that resolves this vulnerability.Fixed in 26.519.22136 - Upgrade
Upgrade
Codex Desktop (Windows)to a version that resolves this vulnerability.Fixed in 26.519.21041Patch Microsoft Store package 26.519.2081.0
Event History
Frequently Asked Questions
Which environments have the additional PowerShell requirement?
On macOS and Linux, exploitation additionally requires PowerShell Core (pwsh) to be separately installed and invoked. The affected products include Codex CLI on Windows, macOS, and Linux, and Codex Desktop on Windows and macOS.
What must occur for the approval bypass to lead to code execution?
A user must open an attacker-prepared repository and Codex must follow its instructions, allowing a file-writing Git command to run without approval. Filesystem protections must permit modification of Codex configuration, and Codex must later load that modified configuration, which can start an attacker-controlled MCP server.
Does the approval bypass bypass filesystem sandboxing?
No. The approval bypass does not disable filesystem sandboxing; on macOS and Linux, the default filesystem sandbox can prevent writes outside permitted locations.
What level of access could an attacker obtain after a successful configuration modification?
An attacker-controlled MCP server can execute code with the affected user's privileges. This can allow reading, changing, or deleting files accessible to that user account.