VulnWatch by ve1ve2
critical 10.0 EPSS 0.59%

RUSTSEC-2026-0548: `ZipStreamReader` extracts entries under local-header names that can differ from the central directory

Source:
OSV.dev
Published:
Fetched:
Updated:
Affects:
zip

https://osv.dev/vulnerability/RUSTSEC-2026-0548 ↗

osvcrates.iofix-available

`ZipStreamReader` extracts entries under local-header names that can differ from the central directory A ZIP archive names each entry twice: in the local file header in front of the entry's data, and in the central directory at the end of the archive. `ZipArchive` lists and opens entries by their central-directory names. `ZipStreamReader::visit` and `ZipStreamReader::extract`, like `read_zipfile_from_stream`, read the local headers in order and use the local-header names without comparing them with the central directory. An archive can therefore show one set of file names to code that inspects it with `ZipArchive` and write files under other names when it is extracted with `ZipStreamReader`. If an application checks an archive one way and extracts it the other way, an attacker can get files written or overwritten inside the destination directory that the check never saw. The fix adds an opt-in check. `ZipStreamReader::enforce_header_consistency(true)` compares each local header with its central-directory entry (name, sizes, CRC-32, compression method, flags and modification time) and fails extraction on a mismatch; `ZipReadOptions::enforce_header_consistency(true)` and `ZipArchive::validate_header_consistency()` do the same for `ZipArchive`. The check is off by default, so upgrading alone does not change what `ZipStreamReader::new(...)` extracts: applications that extract untrusted archives with `ZipStreamReader` need to turn it on. Affected: crates.io:zip Fixed in: 9.0.5 References: https://crates.io/crates/zip https://rustsec.org/advisories/RUSTSEC-2026-0548.html https://github.com/zip-rs/zip2/commit/8068ab480ccf8daa7411424e365fcdbe6d09443e

Linked vulnerabilities (2)

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:L

zip: Critical Parser Differential & Security Control Bypass via Dual-Header Inconsistencies (Zip Cloaking) Leading to Arbitrary File Overwrite & RCE

CWE: CWE-20, CWE-436Aliases: CVE-2026-115905
CVE-2026-115905 critical 10.0 EPSS 0.59% (p49) NVDCVE.orgGHSA
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

zip: Critical Parser Differential & Security Control Bypass via Dual-Header Inconsistencies (Zip Cloaking) Leading to Arbitrary File Overwrite & RCE

CWE: CWE-20, CWE-436Aliases: GHSA-m665-v7pm-7grjNVD: Awaiting Analysis