zip: Header inconsistency in streaming extraction allows file overwrite
Summary
The zip crate for Rust, a library for reading and writing ZIP files, handles duplicate filenames inconsistently. ZipArchive uses the Central Directory header while ZipStreamReader uses the Local File Header, so a crafted archive can look harmless to a scanner but make a streaming extractor write attacker-chosen content to another path. This can overwrite files used by a downstream service. Exploitation requires an application that extracts untrusted archives with ZipStreamReader.
Affected
- zip (Rust crate, zip-rs/zip2) through 9.0.4
- Earlier versions: unknown, verify before assuming either way
Fixed in
- Upgrade to zip 9.0.5 or later
Workaround
Unknown. The vendor has not published a workaround.
- Avoid ZipStreamReader for untrusted archives
- Compare Local File Header and Central Directory filenames before extraction
- Extract only into a directory without write access to service files
Exploitation
- Not listed in CISA KEV (per aggregators; cisa.gov not checked directly)
- Not known to be exploited in the wild
- A public proof of concept repository exists, described as a detection-only scanner; not verified
Our recommendation
- Inventory Rust applications and Cargo.lock files for zip 9.0.4 or earlier
- Prioritise internet-facing ZIP upload or import features and check whether they use ZipStreamReader
- Upgrade to zip 9.0.5 or later and test for regressions
- Monitor for vendor updates
Public exploits
Links to third-party sites, not checked by us – exploit code can contain malware. Only use it in isolated test environments.
- Proof of concept on GitHub (2 repositories)
foxcornlab/zip-cloaking-scanner · cosmonic-labs/demo-zip-rce-sandbox
Research sources
- GitHub Security Advisory GHSA-m665-v7pm-7grj github.com
- zip2 Release v9.0.5 github.com
- zip2 fix commit 8068ab4 github.com
- OSV GHSA-m665-v7pm-7grj osv.dev
- CVE-2026-115905 on cve.now cve.now
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 30 Oct 2026, 13:55.
Original description (NVD)
zip is a zip library for Rust that supports reading and writing simple ZIP files. Through 9.0.4, ZipArchive treats Central Directory File Header filenames as authoritative while ZipStreamReader extracts using Local File Header filenames without reconciling the duplicate metadata in src/read/stream.rs. A crafted archive can therefore appear benign to a component that inspects the central directory but cause a streaming extractor to write a different attacker-selected path and content, potentially overwriting files used by a downstream service. This issue is fixed in version 9.0.5.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
