OpenAI

October 30, 2026

Security

CVE-2026-19591

Repository instructions could cause affected versions of Codex CLI and Codex Desktop to run a Git command through PowerShell without approval. The command could change Codex settings if filesystem protections permitted the write.

Affected products & versions

VendorProductPlatformAffected versions
OpenAICodex CLIWindows, macOS, and Linux0.72.0–0.130.0
OpenAICodex Desktop (application)macOS260202.0859–26.513.31313
OpenAICodex Desktop (application)Windows26.304.38–26.513.40821
OpenAICodex Desktop (Microsoft Store package)Windows26.304.38.0–26.513.4821.0

Version ranges are inclusive.

Impact

If Codex loaded the changed configuration, it could start a server that ran the attacker's code with the user's permissions. That code could read, change, or delete files available to the user. On macOS and Linux, the default filesystem sandbox could prevent Git from changing the configuration file.

Conditions

The user had to open a repository that the attacker prepared, and Codex had to obey its instructions. The attack required Git and PowerShell. On macOS and Linux, Codex had to run a separately installed copy of PowerShell Core (pwsh).

Known exploitation

No known abuse in the wild.

Mitigations

  • Update Codex CLI to version 0.131.0 or a subsequent version.
  • Update Codex Desktop for macOS to application version 26.519.22136 or a subsequent version.
  • Update Codex Desktop for Windows to application version 26.519.21041 (Microsoft Store package 26.519.2081.0) or a subsequent version.
  • Until you update, use Codex only with repositories and repository instructions that you trust.
  • On macOS and Linux, keep the filesystem sandbox enabled.

Vulnerability description

Codex and PowerShell interpreted the PowerShell stop-parsing token (--%) differently. Codex could treat a Git command that wrote to a file as safe and run it without asking the user.

If Git could write to the Codex configuration file, the command could add a Model Context Protocol (MCP) server that the attacker controlled. The server could run when Codex next loaded the changed configuration.

Problem type

CWE-150⁠(opens in a new window) — Improper Neutralization of Escape, Meta, or Control Sequences.

Credits

Emanuele Barbeno, Cyrill Bannwart, Yves Bieri, Lukasz D., and Urs Mueller of Compass Security (@compasssecurity).

References

Author

OpenAI

Publication and revision history

DateChange
September 1, 2026Original publication of the CVE record⁠(opens in a new window).
October 30, 2026Publication on openai.com.