Skip to main content

OpenAI Codex CLI CVE-2026-19591

| EUVDEUVD-2026-69394 HIGH
Improper Neutralization of Escape, Meta, or Control Sequences (CWE-150)
2026-09-01 OAI GHSA-2frj-4qr5-m2rf
8.8
CVSS 3.1 · Vendor: OAI
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker crafts malicious repository with --%] smuggling
  2. Delivery
    Developer opens repository with Codex
  3. Exploit
    Stop-parsing token bypasses command-safety classifier
  4. Install
    Git command silently writes attacker config
  5. C2
    Developer restarts Codex or config reloads
  6. Execute
    Attacker-controlled MCP server connects
  7. Impact
    Arbitrary code executes as developer user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Escape character neutralization
Exploitation Conditions

The attacker must prepare a repository with instructions that use PowerShell's stop-parsing token (--%) to smuggle arguments past Codex's command classifier. The user must actively open that repository using Codex CLI or Codex Desktop and allow Codex to follow embedded instructions. The filesystem sandbox must permit the configuration file write - on macOS and Linux, the default sandbox can block writes outside permitted directories, which stops exploitation in default configurations on those platforms. On macOS and Linux, PowerShell Core (pwsh) must be separately installed for the PowerShell execution path to be reachable; on Windows, built-in PowerShell is always present, making Windows the more exposed platform. After the config write, Codex must subsequently load the modified configuration (e.g., on restart) for the MCP server to launch. The approval bypass does not grant filesystem privileges beyond what the user's account already holds.

Impact

The vendor-supplied CVSS 8.8 (AV:N/AC:L/PR:N/UI:R) reflects a worst-case Windows scenario where PowerShell is built-in and the full attack chain completes without additional prerequisites. Real-world risk is meaningfully lower for several reasons: exploitation requires the user to actively open a specifically crafted repository with Codex, the filesystem sandbox on macOS and Linux blocks config writes in default deployments, and on non-Windows systems the attacker additionally needs PowerShell Core (pwsh) to be separately installed. The multi-step chain - bypass safety check, write config, Codex reloads config, MCP server launches, code executes - makes opportunistic mass exploitation unlikely. EPSS at 0.16% (6th percentile) corroborates low current exploitation activity. No CISA KEV listing exists and no public PoC beyond the test case in PR #22643 is known. The realistic priority is elevated for Windows-based developers who open untrusted repositories with Codex, and lower for macOS/Linux users relying on default sandboxing.

Exploit ScenarioDerived

An attacker publishes a Git repository containing Codex instructions that embed a stop-parsing token in a Git command (e.g., 'git log --% HEAD --output=~/.codex/config.json'); when a developer opens the repository with Codex on Windows and Codex follows the instructions, the safety classifier passes the command without prompting, and the file write overwrites Codex's configuration with attacker-controlled content. On the developer's next Codex session, the modified config causes Codex to connect to an attacker-operated MCP server, which then executes code and exfiltrates or modifies files accessible to the developer's account. The PR #22643 test case ('git log --% HEAD --output=codex_poc.txt') demonstrates the bypass primitive, though no weaponized public PoC is known.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 02, 2026

OpenAI Codex CLI and Codex Desktop's PowerShell command-safety parser failed to recognize PowerShell's stop-parsing token (--%), misclassifying file-writing Git commands embedded after that token as safe and executing them without user approval. An attacker who tricks a developer into opening a crafted repository can cause Codex to silently write an attacker-controlled configuration; when Codex subsequently loads that configuration, it launches an attacker-designated MCP server and executes arbitrary code under the user's account. No public exploit has been identified at time of analysis (EPSS 0.16%, 6th percentile), and the default filesystem sandbox on macOS and Linux can limit the damage radius by preventing writes outside permitted directories.

RemediationAI

Upgrade Codex CLI to a version above 0.130.0, Codex Desktop to a version above 26.513.40821 (or 26.513.31313 for the earlier branch), and the Codex Desktop Microsoft Store package to a version above 26.513.4821.0. The upstream fix is available in https://github.com/openai/codex/pull/22643. Until patching is complete, avoid opening untrusted or third-party repositories with Codex active, as the attack is entirely contingent on user-initiated repository interaction. On macOS and Linux, ensuring PowerShell Core (pwsh) is not installed removes the PowerShell execution path for this attack on those platforms; however, this does not eliminate the Windows risk. The default filesystem sandbox on macOS and Linux provides a compensating control that limits the config write even if the bypass is triggered - confirm sandbox is not loosened via permissive allow-lists.

Affected VersionsENISA

Codex Desktop 260202.0859 ≤26.513.31313
Codex CLI 0.72.0 ≤0.130.0
Codex Desktop 26.304.38 ≤26.513.40821
Codex Desktop (Microsoft Store package) 26.304.38.0 ≤26.513.4821.0

Affected Packages

euvd codex_cli no fix
euvd codex_desktop no fix
euvd codex_desktop_microsoft_store_package no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences). PowerShell's stop-parsing token (--%) instructs the shell to pass all remaining tokens verbatim to native commands without further AST processing. Codex uses a hybrid Rust/PowerShell safety classifier (powershell_parser.ps1 evaluated by a spawned PowerShell process and coordinated by powershell_parser.rs) that flattens the parsed AST into argv-like structures for safety checking. Because --%] was not handled, arguments appearing after the token were evaluated against the wrong parse representation, allowing constructs like 'git log --% HEAD --output=codex_poc.txt' to pass the classifier as safe. The PR #22643 fix adds an early-exit in the PowerShell parser script: if any token equals '--%', the function immediately returns status 'unsupported', blocking auto-approval. Affected CPEs are cpe:2.3:a:openai:codex_cli and cpe:2.3:a:openai:codex_desktop across all platforms.

Know when Codex Cli gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (OAI) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

AC:H reflects multi-step chain requirements: filesystem sandbox must permit config write, Codex must reload config, and pwsh must be present on non-Windows platforms.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (OAI).

CVSS VectorVendor: OAI

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Sep 02, 2026 - 19:22 NVD
8.8 (HIGH)
CVE Published
Sep 01, 2026 - 17:06 cve.org
HIGH 8.8
CVE Published
Sep 01, 2026 - 17:06 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

OpenAI Codex CLI and Desktop versions contain a PowerShell parser bypass allowing attackers to silently write attacker-controlled files when developers open crafted repositories, potentially compromising development workstations with arbitrary code execution. This poses a supply-chain risk by enabling injection of malicious code into development environments and build pipelines. While exploitation probability is low (EPSS 0.2%) and requires social engineering, the attack can evade detection by leveraging hidden command-safety flaws.

Business Impact: High
Compensating Controls

Disable OpenAI Codex when working with untrusted or community-contributed repositories. Enforce mandatory code review of MCP server configuration files before execution. Leverage default operating system filesystem sandboxing on macOS and Linux to restrict Codex write access to designated directories. Implement change monitoring on developer configuration files and MCP server registries. Maintain an auditable inventory of installed MCP servers. Monitor OpenAI security advisories for patch release announcements.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Low
AI coding assistant targeting developers, not general enterprise infrastructure
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy