zip ZipArchive::extract symlink target validation bypass

Severity: info · Published 2026-10-09

The zip library's extract function fails to validate the targets of symbolic links within archives, allowing an attacker to create a symlink pointing outside the intended extraction directory. When an application extracts a malicious archive and then reads or writes through the extracted symlink, it may access files outside the extraction directory with the application's privileges, risking data exposure or modification.

Technologies: zip (crates.io), Zip-Rs Zip. Vendors: crates.io, Zip-Rs.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, published 9 October 2026.
Which products and versions are affected?
zip (crates.io) SEMVER:introduced=0.0.0-0,fixed=9.0.0; Zip-Rs Zip before 9.0.0.
Is there a fix for This vulnerability?
Yes. zip (crates.io): upgrade to 9.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network or with local access.
Am I affected?
Check whether you run zip (crates.io) or Zip-Rs Zip at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • zip (crates.io): upgrade to 9.0.0 or later
    cargo update -p zip

Technical details

The ZipArchive::extract method validates only the output entry path but passes symlink target bytes directly to the platform symlink API without validation, allowing a malicious archive to create symlinks with attacker-controlled targets outside the destination directory. The vulnerability affects macOS and Linux; subsequent reads or writes through the extracted symlink entry access the external target with the extracting process's permissions.

Affected products

  • zip-rs zip before 9.0.0

Identifiers

  • GHSA-4v9h-p7m9-rh26
  • RUSTSEC-2026-0368

Timeline

  • 2026-10-09: disclosed
  • 2026-10-17: advisory
  • 2026-10-09: patched: Fix available in version 9.0.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.