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.
Published: 2026-09-01
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

OpenAI Codex CLI and Codex Desktop are vulnerable because their command‑safety parser incorrectly treats PowerShell's stop‑parsing token (--%) as indicating safe input. This misclassification allows an attacker‑prepared repository to contain PowerShell commands that are executed without explicit user approval. The attacker can then trigger a file‑writing Git operation that modifies the Codex configuration files. If Codex later loads the tampered configuration, it can launch an attacker‑controlled MCP server and execute arbitrary code with the full privileges of the user who ran Codex, enabling read, modification, or deletion of any files accessible to that account.

Affected Systems

Any OpenAI Codex installation on Windows, macOS, or Linux that has not been upgraded to the patched releases is affected. On Windows, Codex CLI versions prior to 0.131.0 and Codex Desktop application versions earlier than 26.519.22136 (macOS) or 26.519.21041 (Windows) carry the flaw. On macOS and Linux, exploitation additionally requires PowerShell Core (pwsh) to be installed separately. All other versions or operating systems not listed are not affected.

Risk and Exploitability

The vulnerability can be leveraged locally by an attacker who deceives a user into opening a malicious repository. The exploitation path requires the attacker to supply a malicious repository and rely on Codex automatically following its instructions. Because the attack is user‑initiated, the likelihood of exploitation in the wild is limited to environments where users regularly open untrusted repositories. EPSS data is not available and the vulnerability is not listed in CISA’s KEV catalog, so the current public exploitation probability is uncertain. Nevertheless, if the attack succeeds, it grants the attacker full local privilege execution and can compromise the user’s entire file system hierarchy, posing a significant risk to confidentiality, integrity, and availability.

Generated by OpenCVE AI on September 1, 2026 at 23:43 UTC.

Remediation

Vendor Solution

Upgrade Codex CLI to version 0.131.0 or later, Codex Desktop for macOS to application version 26.519.22136 or later, or Codex Desktop for Windows to application version 26.519.21041 (Microsoft Store package 26.519.2081.0) or later.


Vendor Workaround

Until updated, do not open or follow instructions from untrusted repositories. On macOS and Linux, keep filesystem sandboxing enabled.


OpenCVE Recommended Actions

  • Upgrade Codex CLI to version 0.131.0 or later and upgrade Codex Desktop for macOS to application version 26.519.22136 or later, or Codex Desktop for Windows to application version 26.519.21041 (Microsoft Store package 26.519.2081.0) or later.
  • Until the update is applied, do not open or follow instructions from untrusted repositories and refrain from running repositories with unknown provenance.
  • Enable and maintain filesystem sandboxing on macOS and Linux to prevent unauthorized writes outside permitted locations.

Generated by OpenCVE AI on September 1, 2026 at 23:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

References
History

Wed, 02 Sep 2026 00:00:00 +0000

Type Values Removed Values Added
Title Codex Bypass of PowerShell Stop‑Parsing Token Leading to Local Code Execution

Tue, 01 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
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.
Weaknesses CWE-150
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: OAI

Published:

Updated: 2026-09-01T17:06:45.647Z

Reserved: 2026-08-12T03:54:33.704Z

Link: CVE-2026-19591

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-01T18:17:40.260

Modified: 2026-09-01T21:03:04.987

Link: CVE-2026-19591

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-01T23:45:17Z

Weaknesses
  • CWE-150

    Improper Neutralization of Escape, Meta, or Control Sequences