Skip to content
HighVulnerabilityLLM-specific

CVE-2025-59532: Codex CLI sandbox bypass allowing arbitrary file writes and command execution

Identifier
CVE-2025-59532
Published
Record updated
View JSON
Affected
  • @openai/codex >= 0.2.0, <= 0.38.0
Fixed in
0.39.0
  • released September 18, 2025, 5 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.9%

Summary

CVE-2025-59532 affects Codex CLI, OpenAI's locally run coding agent, in versions 0.2.0 to 0.38.0. A bug in the sandbox configuration logic let Codex CLI treat a model-generated cwd as the sandbox's writable root, even for paths outside the folder where the session started. This bypassed the workspace boundary and enabled arbitrary file writes and command execution with the permissions of the Codex process, though the network-disabled sandbox restriction was not affected.

Mitigation

Fixed in Codex CLI 0.39.0, which canonicalizes and validates the sandbox policy boundary against where the user started the session rather than the model-generated path. Users on 0.38.0 or earlier should update immediately via their package manager or by reinstalling the latest Codex CLI. Users of the Codex IDE extension should update to 0.4.12.