INCIDENT MAP

Browse / MCP and Tool Server Flaws / CVE-2025-61260

OpenAI Codex CLI enables code execution through malicious MCP (Model Context Protocol) configuration files

CVE-2025-61260 ยท 2026-04-14 critical

Class
MCP and Tool Server Flaws (filed by a model that read the advisory)
Technique
Code and command execution
Also involves
Unsafe Model Loading and Supply Chain
Affected
@openai/codex (npm)
Gets past
Approval or confirmation prompt
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
6.9% chance of exploitation in 30 days

How it works, in short

Running the Codex CLI in a malicious repository auto-loads project config that defines commands, which execute without user confirmation. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.