Zip-rs zip2
zip Vulnerable to Incorrect Path Canonicalization During Archive Extraction, Leading to Arbitrary File Write
`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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.3.0, < 2.3.0
Fixed in 2.3.0
Mitigation
Upgrade zip2 to 2.3.0 or later.
References
- Vendor advisory github.com/zip-rs/zip2/security/advisories/GHS…
- Patch github.com/zip-rs/zip2/commit/a2e062f37066c3b1…
- Release notes github.com/zip-rs/zip2/releases/tag/v2.3.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.