CVE-2025-61260 OpenAI Codex CLI enables code execution through malicious MCP (Model Context Protocol) configuration files
Attackers can execute arbitrary code by placing malicious configuration files in a repository, affecting developers using the OpenAI Codex CLI.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-61260?
CVE-2025-61260 is a critical code injection vulnerability in n/a, published on 14 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A vulnerability was identified in OpenAI Codex CLI v0.23.0 and before that enables code execution through malicious MCP (Model Context Protocol) configuration files. The attack is triggered when a user runs the codex command inside a malicious or compromised repository. Codex automatically loads project-local .env and .codex/config.toml files without requiring user confirmation, allowing attackers to embed arbitrary commands that execute immediately.
Weakness: CWE-94
Which versions are affected by CVE-2025-61260?
2 open source packages ship an affected version, including @openai/codex.
| Package | Affected | Fixed in |
|---|---|---|
@openai/codex npm | All versions to 0.23.0 | None |
@openai/codex npm | All versions to 0.23.0 | None |
How do I fix CVE-2025-61260?
No fix has been published for CVE-2025-61260 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-61260 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61260 exists.
Sources
Also known as GHSA-xrxf-jgv3-qmrm.