ghsa-w5fx-fh39-j5rw
Vulnerability from github
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.
Remediation We 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.
If using the Codex IDE extension, users should immediately update to 0.4.12 for a fix of the sandbox issue.
Thank you to Tzanko Matev (Codetracer) for reporting the issue!
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 0.38.0" }, "package": { "ecosystem": "npm", "name": "@openai/codex" }, "ranges": [ { "events": [ { "introduced": "0.2.0" }, { "fixed": "0.39.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-59532" ], "database_specific": { "cwe_ids": [ "CWE-20" ], "github_reviewed": true, "github_reviewed_at": "2025-09-19T17:14:04Z", "nvd_published_at": "2025-09-22T21:16:00Z", "severity": "HIGH" }, "details": "Due to a bug in the sandbox configuration logic, Codex CLI could treat a model-generated `cwd` as the sandbox\u2019s 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!", "id": "GHSA-w5fx-fh39-j5rw", "modified": "2025-09-22T21:59:01Z", "published": "2025-09-19T17:14:04Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "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", "type": "CVSS_V4" } ], "summary": "Codex has sandbox bypass due to bug in path configuration logic" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.