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
Affected products & versions
| Vendor | Product | Platform | Affected versions |
|---|---|---|---|
| OpenAI | Codex CLI | Windows, macOS, and Linux | 0.72.0–0.130.0 |
| OpenAI | Codex Desktop (application) | macOS | 260202.0859–26.513.31313 |
| OpenAI | Codex Desktop (application) | Windows | 26.304.38–26.513.40821 |
| OpenAI | Codex Desktop (Microsoft Store package) | Windows | 26.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
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
Known exploitation
No known abuse in the wild.
Mitigations
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
Credits
Emanuele Barbeno, Cyrill Bannwart, Yves Bieri, Lukasz D., and Urs Mueller of Compass Security (@compasssecurity).
References
Author
Publication and revision history
| Date | Change |
|---|---|
| September 1, 2026 | Original publication of the CVE record(opens in a new window). |
| October 30, 2026 | Publication on openai.com. |