OpenAI Codex CLI enables code execution through malicious MCP (Model Context Protocol) configuration files
CVE-2025-61260 · GHSA-xrxf-jgv3-qmrm · published 2026-04-14 · updated 2026-04-16
- Severity
- Critical
- CVSS score
- 9.8
- Chance of exploitation (EPSS)
- 6.9%
- Fixed in
- No fix yet
- Exploitation Public proof of concept
- Automatable Yes
- Technical impact Total
- CISA SSVC
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.
No fixed release is listed yet for @openai/codex. Follow the source advisory for updates, and until one ships:
General guidance from ShieldPi, not a vendor fix
- Command or code injection. Remove or disable the affected server or tool, or run it in a sandbox with no secrets in its environment.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @openai/codex | npm | <= 0.23.0 | No fix yet |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
- HighCodex has sandbox bypass due to bug in path configuration logic@openai/codex
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.