Critical · 10.0 Critical vulnerabilities CVE-2026-115905
CVE-2026-115905: ZIP Parsing Inconsistency in Rust 'zip' Library Allows File Overwrite via Crafted Archives
A vulnerability in the Rust 'zip' library allows crafted ZIP archives to pass inspection as benign while a streaming extractor writes attacker-controlled paths and content, due to inconsistent handling of duplicate filename metadata. Fixed in version 9.0.5.
By PatchBriefing ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A vulnerability has been identified in the Rust 'zip' library, a crate used for reading and writing ZIP archives. The issue, tracked as CVE-2026-115905, stems from inconsistent handling of filename metadata within ZIP archive structures, allowing crafted archives to cause unexpected file writes when processed by certain components of the library. The issue is fixed in version 9.0.5.
What Happened
A vulnerability was disclosed in the Rust 'zip' library, which is used to read and write ZIP files. Through version 9.0.4, the ZipArchive component treats filenames found in the Central Directory File Header as authoritative, while the ZipStreamReader component extracts files using filenames from the Local File Header instead, without reconciling the two when they differ. ZIP format allows these two header sets to contain duplicate but distinct metadata for the same entry.
Technical Cause
The root cause is located in src/read/stream.rs, where the streaming reader does not validate or reconcile Local File Header filenames against the corresponding Central Directory File Header filenames. Because a crafted archive can contain mismatched values for the same entry, a component that inspects only the central directory may consider the archive benign, while a streaming extractor processing the same archive writes a different, attacker-chosen file path and content. This is categorized under CWE-20 (Improper Input Validation).
Why It Matters
If an application inspects or validates a ZIP archive using one component (relying on central directory metadata) but extracts its contents using a different streaming component (relying on local file header metadata), an attacker can exploit the discrepancy to write files to paths and with content of their choosing. This could overwrite files used by a downstream service, potentially leading to data corruption, configuration tampering, or further compromise depending on what files are overwritten and how they are subsequently used.
Affected Versions
Versions of the 'zip' library through 9.0.4 are affected. The issue is fixed in version 9.0.5.
Fixes and Mitigation
The vendor update to version 9.0.5 addresses this issue. Users of the 'zip' crate should upgrade to version 9.0.5 or later. No further mitigation details are provided in the available facts.
Recommended Action
Developers using the Rust 'zip' crate (versions through 9.0.4) should update to version 9.0.5 as soon as practical, particularly if their application performs separate validation and extraction steps on ZIP archives using different components of the library.
PatchBriefing score
10.0 / 10 · Critical
Official CVSS: 10.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:L
EPSS 0.0051 (36 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
Reported fixes
The vendor update to version 9.0.5 addresses this issue. Users of the 'zip' crate should upgrade to version 9.0.5 or later. No further mitigation details are provided in the available facts.
How this was built
1 source records were collected, matched and used to prepare the report above.
-
NVD (NIST) database
Revision history
- Published
- Generated