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

CVE-2026-115908: zip: Arbitrary file write outside the extraction directory, because ZipArchive::extract validates symlink targets lexically.

October 29, 2026

  • Verified version: zip 9.0.0-pre3
  • Affected versions: 7.2.0 and later
  • Precondition: The attacker knows (or can guess) the absolute path of the extraction destination

The validation applied to symlinks is purely lexical. As a result, an attacker can write arbitrary files outside the extraction directory through a symlink. Exploitation requires the attacker to know (or guess) the absolute path of the destination, but this is realistic in practice: CI workspaces, /opt/app, a fixed Downloads path, and so on.

Impact extends further on Windows (verified on real hardware for both the separate-drive and UNC-share cases): Because simplified_components discards the Prefix component, paths like D:\<same tail as dest> or a UNC path \\attacker\share\<same tail> pass the starts_with check. As a result, outpath.push gets replaced onto a different drive/remote share, so a single symlink is enough — no intermediate symlink chain is required. That said, creating a symlink on Windows requires SeCreateSymbolicLinkPrivilege (administrator rights or Developer Mode enabled). Real-hardware verification (Windows 10 VM (19045.2604), tests/poc_win.rs): With the extraction target set to a temporary directory under C:, both of the following paths returned Ok(()) from extract() and successfully wrote outside the extraction target. In both cases extract() returned no error (Ok(())), and it was confirmed that the contents of pwned.txt matched the attacker-specified value.

References

  • github.com/advisories/GHSA-hjqx-j4rw-g7xv
  • github.com/zip-rs/zip2/commit/09c030eab56e8db8fb3c1c33f554407b30bad8fa
  • github.com/zip-rs/zip2/releases/tag/v9.0.0
  • github.com/zip-rs/zip2/security/advisories/GHSA-hjqx-j4rw-g7xv
  • nvd.nist.gov/vuln/detail/CVE-2026-115908

Code Behaviors & Features

Detect and mitigate CVE-2026-115908 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 7.2.0 before 9.0.0

Fixed versions

  • 9.0.0

Solution

Upgrade to version 9.0.0 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')
  • CWE-61: UNIX Symbolic Link (Symlink) Following

Source file

cargo/zip/CVE-2026-115908.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Fri, 30 Oct 2026 00:16:50 +0000.