CVE-2026-19591
Received Received - Intake

Code Execution via PowerShell Stop-Parsing Token Bypass in Codex CLI

Vulnerability report for CVE-2026-19591, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-01

Last updated on: 2026-09-01

Assigner: OAI

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-01
Last Modified
2026-09-01
Generated
2026-09-01
AI Q&A
2026-09-01
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
openai codex *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-150 The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

OpenAI Codex CLI and Desktop misclassified certain PowerShell commands as safe due to incorrect parsing of PowerShell's stop-parsing token (--%). This allowed Codex to execute file-writing Git commands without user approval when opening an attacker-prepared repository.

Detection Guidance

Detecting this vulnerability requires checking if Codex CLI or Desktop is installed and reviewing PowerShell command usage in repositories. Look for unexpected configuration file modifications or MCP server launches. No specific commands are provided in the context.

Impact Analysis

If exploited, this vulnerability could allow an attacker to modify Codex's configuration, launch a malicious MCP server, and execute code with your user privileges. This could lead to unauthorized access, data theft, or file manipulation on your system.

Compliance Impact

This vulnerability could lead to unauthorized code execution and file modifications, potentially violating data protection requirements under GDPR and HIPAA by allowing access to or alteration of sensitive personal or health information.

Mitigation Strategies

Update Codex CLI or Desktop to the latest version. Avoid opening untrusted repositories. Disable PowerShell Core (pwsh) if installed. Review and restrict filesystem permissions for Codex. Monitor for unauthorized configuration changes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-19591. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart