Arbitrary Code Injection Affecting @openai/codex package, versions <0.23.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.1% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-OPENAICODEX-16111764
  • published20 Apr 2026
  • disclosed14 Apr 2026
  • creditIsabel Mill, Oded Vanunu

Introduced: 14 Apr 2026

NewCVE-2025-61260  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade @openai/codex to version 0.23.0 or higher.

Overview

@openai/codex is a

OpenAI Codex CLI

Lightweight coding agent that runs in your terminal

Affected versions of this package are vulnerable to Arbitrary Code Injection via the automatic loading of .env and .codex/config.toml files when executing the CLI in a compromised repository. An attacker can execute arbitrary commands by embedding malicious payloads in these configuration files.

CVSS Base Scores

version 4.0
version 3.1