Skip to Content

How does CVE-2025-61260 allow attackers to hijack developer workflows through supply chains?

Is your local development environment safe from the latest OpenAI Codex CLI vulnerability?

Security researchers at Check Point Research (CPR) identified a critical security flaw in the OpenAI Codex CLI. Designated as CVE-2025-61260, this vulnerability exposes developers to significant risks, including silent code execution, data exfiltration, and unauthorized system infiltration. The flaw resides in how the tool processes local project files, effectively turning standard development workflows into potential attack vectors.

The Role of Codex CLI in Development

OpenAI designed Codex CLI to integrate AI-powered assistance directly into the terminal. This tool targets developers who prefer command-line interfaces for executing code, editing files, and iterating on software under version control. While originally documented as a TypeScript project, the current iteration utilizes a Rust implementation to facilitate “chat-driven development.”

The tool aims to streamline workflows by automating approval processes and utilizing directory sandboxing. However, this automation and implicit trust in local directory configurations created the security gap that researchers exploited.

Understanding the Threat Mechanism

The vulnerability stems from the CLI’s automatic trust in configuration files found within a project’s directory. When a developer runs Codex within a specific repository, the tool automatically loads Model Context Protocol (MCP) server entries from the local configuration.

CPR analysis shows that Codex resolves these configurations and executes declared commands immediately upon startup. The application fails to request user approval or validate the commands. Consequently, the CLI treats project-local MCP configurations as trusted, regardless of their origin. This creates a scenario where a malicious actor can embed harmful commands in a repository that executes the moment a developer engages with the tool.

Anatomy of the Supply Chain Attack

This vulnerability enables a “silent” supply chain attack. Because the exploit relies on the presence of a configuration entry rather than the content’s visibility, malicious payloads remain stealthy. Attackers can commit a manipulated .codex/config.toml file to a shared repository. When a victim clones this repository and initializes Codex, the attack triggers.

Potential consequences include:

  • Silent Command Execution: Malicious commands defined in MCP entries run automatically in the user’s context without notification.
  • Persistent Remote Access: Attackers can configure reverse shells to gain access whenever the developer starts the application.
  • Data Exfiltration: Scripts can steal SSH keys, cloud tokens, and source code immediately upon execution.
  • CI/CD Pipeline Infection: If automated build systems run Codex on compromised projects, the malware can spread to deployment artifacts.
  • Lateral Movement: Stolen credentials allow attackers to pivot from a developer’s machine to internal networks or cloud environments.

Remediation and Actionable Advice

This vulnerability affects all versions of OpenAI Codex CLI prior to 0.23.0. The attack vector highlights a critical flaw in trusting local files without validation.

OpenAI addressed this issue on August 20, 2025, with the release of version 0.23.0. This update explicitly blocks the automatic redirection of CODEX_HOME via .env files, effectively neutralizing the attack path described by Check Point Research.

Immediate Steps for Developers:

  1. Verify Version: Check your current Codex CLI installation.
  2. Update Immediately: Upgrade to version 0.23.0 or later.
  3. Audit Repositories: Scrutinize .codex configurations in third-party or public repositories before execution.