Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. zip
  4. ›
  5. CVE-2025-29787

CVE-2025-29787: zip Incorrectly Canonicalizes Paths during Archive Extraction Leading to Arbitrary File Write

March 17, 2025 (updated March 19, 2025)

In the archive extraction routine of affected versions of the zip crate, 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.

References

  • gist.github.com/eternal-flame-AD/bf71ef4f6828e741eb12ce7fd47b7b85
  • github.com/advisories/GHSA-94vh-gphv-8pm8
  • github.com/zip-rs/zip2
  • github.com/zip-rs/zip2/commit/a2e062f37066c3b12860a32eb1cb44856cfb7afe
  • github.com/zip-rs/zip2/releases/tag/v2.3.0
  • github.com/zip-rs/zip2/security/advisories/GHSA-94vh-gphv-8pm8
  • nvd.nist.gov/vuln/detail/CVE-2025-29787

Code Behaviors & Features

Detect and mitigate CVE-2025-29787 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.3.0 before 2.3.0

Fixed versions

  • 2.3.0

Solution

Upgrade to version 2.3.0 or above.

Weakness

  • CWE-61: UNIX Symbolic Link (Symlink) Following

Source file

cargo/zip/CVE-2025-29787.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:19 +0000.