{"answers":{"affected":"3 open source packages ship an affected version, including zip.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-29787 exists.","fix":"Upgrade zip to 2.3.0 or later.","what":"CVE-2025-29787 is a high-severity path traversal vulnerability in zip-rs zip2, published on 17 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-29787 and fix it if it is affected.\n\nWhat it is: CVE-2025-29787 is a high-severity path traversal vulnerability in zip-rs zip2, published on 17 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-29787 exists.\n\nAffected packages and fixed versions:\n- zip (crates.io): affected from 1.3.0; fixed in 2.3.0\n- zip (crates.io): affected from 1.3.0; fixed in 2.3.0\n- zip (crates.io): affected from 1.3.0; fixed in 2.3.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-29787/ (Markdown: https://insights.sbomify.com/CVE-2025-29787/index.md)","id":"CVE-2025-29787","markdown":"https://insights.sbomify.com/CVE-2025-29787/index.md","name":"CVE-2025-29787","record":{"aliases":["GHSA-94vh-gphv-8pm8","RUSTSEC-2025-0168","UBUNTU-CVE-2025-29787"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust zip library","requires_auth":"low_privilege","summary":"Attackers can overwrite arbitrary files via malicious ZIP archives due to improper path canonicalization, potentially leading to code execution.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.3,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:H/SI:H/SA:H","version":"4.0"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-180","name":"Incorrect Behavior Order: Validate Before Canonicalize"}],"description":"`zip` is a zip library for rust which supports reading and writing of simple ZIP files. In the archive extraction routine of affected versions of the `zip` crate starting with version 1.3.0 and prior to version 2.3.0, symbolic links earlier in the archive are allowed to be used for later files in the archive without validation of the final canonicalized path, allowing maliciously crafted archives to overwrite arbitrary files in the file system when extracted. Users who extract untrusted archive files using the following high-level API method may be affected and critical files on the system may be overwritten with arbitrary file permissions, which can potentially lead to code execution. Version 2.3.0 fixes the issue.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"zip Vulnerable to Incorrect Path Canonicalization During Archive Extraction, Leading to Arbitrary File Write","id":"CVE-2025-29787","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":3,"n_references":4,"next":{"headline":"Sylius PayPal Plugin Payment Amount Manipulation Vulnerability","id":"CVE-2025-29788"},"packages":[{"ecosystem":"crates.io","fixed":["2.3.0"],"introduced":["1.3.0"],"last_affected":[],"package":"zip","purl":null,"source":"GHSA-94vh-gphv-8pm8"},{"ecosystem":"crates.io","fixed":["2.3.0"],"introduced":["1.3.0"],"last_affected":[],"package":"zip","purl":"pkg:cargo/zip","source":"GHSA-94vh-gphv-8pm8"},{"ecosystem":"crates.io","fixed":["2.3.0"],"introduced":["1.3.0"],"last_affected":[],"package":"zip","purl":"pkg:cargo/zip","source":"RUSTSEC-2025-0168"}],"prev":{"headline":"Memory Exhaustion in Expr Parser with Unrestricted Input","id":"CVE-2025-29786"},"products":["zip2"],"published":"2025-03-17","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":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-19","vendors":["zip-rs"]},"summary":"Attackers can overwrite arbitrary files via malicious ZIP archives due to improper path canonicalization, potentially leading to code execution.","url":"https://insights.sbomify.com/CVE-2025-29787/"}