# CVE-2025-59532: Codex has sandbox bypass due to bug in path configuration logic

- Severity: High 8.6 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.98%, higher than 61% of CVEs (2026-11-30)
- Published: 2025-09-19T17:14:04.000Z
- Modified: 2026-10-11T20:10:00.200Z
- Also known as: GHSA-w5fx-fh39-j5rw
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- openai codex: >= 0.2.0, < 0.39.0
- @openai/codex (npm): from 0.2.0 before 0.39.0

## Every score

- GitHub_M: CVSS:4.0 8.6 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/openai/codex/security/advisories/GHSA-w5fx-fh39-j5rw> (web)
- <https://github.com/openai/codex/commit/8595237505a1e0faabc2af3db805b66ce3ae182d> (web)
- <https://github.com/openai/codex/releases/tag/rust-v0.39.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-59532> (advisory)
- <https://github.com/openai/codex> (package)

## Sources

- CVE List: [CVE-2025-59532](https://www.cve.org/CVERecord?id=CVE-2025-59532), CVE Terms of Use, modified 2025-09-23
- GitHub Advisory Database: [GHSA-w5fx-fh39-j5rw](https://github.com/advisories/GHSA-w5fx-fh39-j5rw), CC-BY-4.0, modified 2025-09-22
- NVD: [CVE-2025-59532](https://nvd.nist.gov/vuln/detail/CVE-2025-59532), Public domain, modified 2026-10-11

---

Page: https://cve.day/CVE-2025-59532 · Whole record: https://cve.day/CVE-2025-59532.json · Rebuilt by cve.day 2026-11-25T22:59:05.010Z
