CVE-2026-19591: CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences in OpenAI Codex CLI
Description
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.
CVSS v3.1
Score 8.8high
Affected software
OpenAI
Codex CLI
OpenAI
Codex Desktop
OpenAI
Codex Desktop
OpenAI
Codex Desktop (Microsoft Store package)
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS improperly neutralize escape or control sequences in PowerShell commands because their command-safety parser interprets PowerShell's stop-parsing token (--%) differently than PowerShell itself. This misclassification allows Codex to execute a file-writing Git command without requesting user approval when opening an attacker-prepared repository. On macOS and Linux, exploitation additionally requires PowerShell Core (pwsh) to be installed. If filesystem permissions allow, the command can modify Codex's configuration file. When Codex loads this modified configuration, it can launch an attacker-controlled MCP server and execute arbitrary code with the user's privileges, enabling reading, modification, or deletion of files accessible to that user. The approval bypass does not disable filesystem sandboxing; the default sandbox on macOS and Linux can prevent writes outside permitted locations.
Potential Impact
Successful exploitation allows an attacker to bypass user approval and execute file-writing Git commands, potentially modifying Codex's configuration. This can lead to arbitrary code execution with the privileges of the user running Codex, including reading, changing, or deleting files accessible to that user. The vulnerability affects confidentiality, integrity, and availability of the user's environment. On macOS and Linux, exploitation requires PowerShell Core and is limited by filesystem sandboxing, which may restrict the locations where files can be written.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should exercise caution when opening repositories from untrusted sources. On macOS and Linux, ensure that PowerShell Core is not installed if not needed, and verify filesystem sandboxing configurations to limit potential write locations. Monitor vendor communications for updates and apply official patches once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- OAI
- Date Reserved
- 2026-08-12T03:54:33.704Z
- State
- PUBLISHED
Threat ID: 6a9709e5acd9273b49fc60bd
Added to database: 09/01/2026, 17:22:45 UTC
Last enriched: 09/07/2026, 13:30:30 UTC
Last updated: 10/17/2026, 06:48:16 UTC
Views: 155
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.