Codex
Codex has sandbox bypass due to bug in path configuration logic
Codex CLI is a coding agent from OpenAI that runs locally. In versions 0.2.0 to 0.38.0, due to a bug in the sandbox configuration logic, Codex CLI could treat a model-generated cwd as the sandbox’s writable root, including paths outside of the folder where the user started their session. This logic bypassed the intended workspace boundary and enables arbitrary file writes and command execution where the Codex process has permissions - this did not impact the network-disabled sandbox restriction. This issue has been patched in Codex CLI 0.39.0 that canonicalizes and validates that the boundary used for sandbox policy is based on where the user started the session, and not the one generated by the model. Users running 0.38.0 or earlier should update immediately via their package manager or by reinstalling the latest Codex CLI to ensure sandbox boundaries are enforced. If using the Codex IDE extension, users should immediately update to 0.4.12 for a fix of the sandbox issue.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.2.0, < 0.39.0
Fixed in 0.39.0
Mitigation
Upgrade codex to 0.39.0 or later.
References
- Vendor advisory github.com/openai/codex/security/advisories/GH…
- Patch github.com/openai/codex/commit/8595237505a1e0f…
- Release notes github.com/openai/codex/releases/tag/rust-v0.3…
Timeline
Days relative to CVE publicationFirst public PoC 93 days after publication; not in CISA KEV. First PoC: baktistr/cve-2025-59532-poc (created 25 Dec 2025, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| baktistr/cve-2025-59532-poc | 25 Dec 2025 +93 d | 0 | PoC
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.