{"answers":{"affected":"2 open source packages ship an affected version, including @openai/codex.","exploited":"There is no known exploitation of CVE-2025-59532 in the wild and no public exploit code.","fix":"Upgrade @openai/codex to 0.39.0 or later.","what":"CVE-2025-59532 is a high-severity path traversal vulnerability in openai codex, published on 22 Sep 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-59532 and fix it if it is affected.\n\nWhat it is: CVE-2025-59532 is a high-severity path traversal vulnerability in openai codex, published on 22 Sep 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-59532 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @openai/codex (npm): affected from 0.2.0; fixed in 0.39.0\n- @openai/codex (npm): affected from 0.2.0; fixed in 0.39.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-59532/ (Markdown: https://insights.sbomify.com/CVE-2025-59532/index.md)","id":"CVE-2025-59532","markdown":"https://insights.sbomify.com/CVE-2025-59532/index.md","name":"CVE-2025-59532","record":{"aliases":["GHSA-w5fx-fh39-j5rw"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"OpenAI Codex CLI","requires_auth":"low_privilege","summary":"A bug in Codex CLI allowed model-generated paths to bypass sandbox boundaries, enabling arbitrary file writes and command execution.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.6,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2025-12-25","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-12-25T08:21:36Z","kind":"github_poc","ref":"https://github.com/baktistr/cve-2025-59532-poc","stars":0,"title":"A Docker-based research environment for analyzing CVE-2025-59532, a path traversal vulnerability in OpenAI Codex CLI that allows arbitrary file write outside the intended workspace sandbox. Part of CMU Course : 18-739 Hacking \u0026 Offensive Security in Fall 2025"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Codex has sandbox bypass due to bug in path configuration logic","id":"CVE-2025-59532","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":2,"n_references":3,"next":{"headline":"CryptoLib command Injection vulnerability in initialize_kerberos_keytab_file_login()","id":"CVE-2025-59534"},"packages":[{"ecosystem":"npm","fixed":["0.39.0"],"introduced":["0.2.0"],"last_affected":[],"package":"@openai/codex","purl":null,"source":"GHSA-w5fx-fh39-j5rw"},{"ecosystem":"npm","fixed":["0.39.0"],"introduced":["0.2.0"],"last_affected":[],"package":"@openai/codex","purl":"pkg:npm/%40openai/codex","source":"GHSA-w5fx-fh39-j5rw"}],"prev":{"headline":"Unauthenticated argocd-server panic via a malicious Bitbucket-Server webhook payload","id":"CVE-2025-59531"},"products":["codex"],"published":"2025-09-22","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-09-23","vendors":["openai"]},"summary":"A bug in Codex CLI allowed model-generated paths to bypass sandbox boundaries, enabling arbitrary file writes and command execution.","url":"https://insights.sbomify.com/CVE-2025-59532/"}