CVE-2025-29787: zip Package Arbitrary File Write Vulnerability

zip Updated 14 Dec 2025

Summary

17/03/2025
Yes i
High
7.3

CVE-2025-29787: zip Incorrectly Canonicalizes Paths during Archive Extraction Leading to Arbitrary File Write. Affects zip versions >= 1.3.0, < 2.3.0. Fixed in 2.3.0. How to fix ↓

Also tracked for

The same CVE-2025-29787 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The 'zip' crate is a widely used library in Rust for handling ZIP archive files. It provides functionalities for creating, reading, and extracting ZIP files. The library is designed to be efficient and secure, but it has a vulnerability that allows for improper handling of symbolic links during the extraction process, which can lead to serious security risks.

Vulnerability Detail

In the archive extraction routine of affected versions of the 'zip' crate, symbolic links earlier in the archive can be exploited to overwrite arbitrary files in the file system. This vulnerability arises from the failure to validate the final canonicalized path of these symbolic links, allowing maliciously crafted archives to escape the intended extraction directory. This is a variant of the zip-slip vulnerability, which can lead to unauthorized file modifications and potential code execution.

How To Fix

Latest published version: 9.0.5 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, avoid extracting untrusted ZIP archives using the affected methods. Instead, consider using alternative libraries or tools that do not allow symbolic link traversal during extraction.

Conclusion

The CVE-2025-29787 vulnerability in the 'zip' crate poses significant risks due to improper handling of symbolic links during extraction. Users are encouraged to update to the patched version to mitigate these risks and ensure the security of their applications.

See every vulnerability recorded for zip →

Share this vulnerability

FAQ

CVE-2025-29787 is a vulnerability in the 'zip' crate that allows for arbitrary file writes due to improper handling of symbolic links during archive extraction.

Versions of the 'zip' crate from 1.3.0 to 2.2.9 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

Exploiting this vulnerability can lead to unauthorized file modifications, potentially allowing attackers to execute arbitrary code on the system.

Yes, the vulnerability has been patched in version 2.3.0 of the 'zip' crate. Users are advised to update to this version or later.

Related vulnerabilities

Recent vulnerabilities recorded for zip.

How To Fix

Latest published version: 9.0.5 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback