{"id":"GHSA-w5fx-fh39-j5rw","summary":"Codex has sandbox bypass due to bug in path configuration logic","details":"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.\n\nThis 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.\n\n**Remediation**\nWe released a patch 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.\n\nIf using the Codex IDE extension, users should immediately update to **0.4.12** for a fix of the sandbox issue.\n\nThank you to Tzanko Matev (Codetracer) for reporting the issue!","aliases":["CVE-2025-59532"],"modified":"2025-09-22T21:59:01Z","published":"2025-09-19T17:14:04Z","database_specific":{"github_reviewed_at":"2025-09-19T17:14:04Z","nvd_published_at":"2025-09-22T21:16:00Z","cwe_ids":["CWE-20"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/openai/codex/security/advisories/GHSA-w5fx-fh39-j5rw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59532"},{"type":"WEB","url":"https://github.com/openai/codex/commit/8595237505a1e0faabc2af3db805b66ce3ae182d"},{"type":"PACKAGE","url":"https://github.com/openai/codex"},{"type":"WEB","url":"https://github.com/openai/codex/releases/tag/rust-v0.39.0"}],"affected":[{"package":{"name":"@openai/codex","ecosystem":"npm","purl":"pkg:npm/%40openai/codex"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.0"},{"fixed":"0.39.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.38.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-w5fx-fh39-j5rw/GHSA-w5fx-fh39-j5rw.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}