Rust zip-rs/zip2: Arbitrary file overwrite and RCE via ZIP header mismatch (CVE-2026-115905)
CVE-2026-115905 is a critical vulnerability in the Rust zip crate (versions <= 9.0.4) allowing arbitrary file overwrites or RCE via ZIP header discrepancy between CDFH and LFH.
CVE search metadata
CVE search record: CVE-2026-115905. KEV: no. Product: zip2 (< 9.0.5). Brief: Rust zip-rs/zip2: Arbitrary file overwrite and RCE via ZIP header mismatch (CVE-2026-115905). Brief link: https://feed.craftedsignal.io/briefs/2026-10-zip-cloaking-vulnerability/
Triage facts
Revision 1- Applicability
- zip2 (< 9.0.5)
- Evidence
- Unknown
- Severity
- Critical
- Action
- Elevated
- Sources
- 3 public sources
- Freshness
- Revision 1Oct 27, 09:20 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- B2Likely
CVE-2026-115905 affects the zip crate in the Rust zip-rs/zip2 ecosystem. The vulnerability arises from differential parsing where ZipArchive relies on the Central Directory File Header (CDFH) for file metadata, while ZipStreamReader relies on the Local File Header (LFH). An attacker can craft a ZIP archive where the CDFH points to a benign file to bypass gateway security inspections, but the LFH directs the extraction to a sensitive path, resulting in an arbitrary file overwrite or potential RCE.
Attack Chain
- Attacker crafts a malicious ZIP archive with mismatched CDFH and LFH filenames.
- CDFH is configured to contain a benign filename (e.g., doc_report.pdf).
- LFH is configured to contain a malicious path (e.g., /home/user/.ssh/authorized_keys or a system startup script).
- The victim or a gateway security appliance inspects the ZIP archive using a parser that only validates the CDFH.
- The security inspection concludes the archive is safe.
- The target application uses
ZipStreamReaderto extract the archive. - The streaming extractor follows the LFH and overwrites a critical system or application file with attacker-controlled content.
Impact
Successful exploitation allows for arbitrary file overwrites, leading to potential Remote Code Execution (RCE) or security control bypass.
Recommendation
- Patch all projects using the Rust
zipcrate by updating the dependency to version 9.0.5 or newer. - Audit existing infrastructure for applications that perform streaming extraction of user-supplied ZIP archives.
- Until patching is possible, implement validation logic that reconciles CDFH and LFH filenames before initiating extraction.
- Deploy the triage scanner provided by
foxcornlabto auditCargo.lockand suspicious ZIP archives for header mismatches.
Immediate actions
Upgrade 'zip' crate dependency to 9.0.5 or later in all Rust-based projects.
Threat Hunt
Identify all applications utilizing the rust 'zip' crate via 'Cargo.lock' files.
Data: Repository file contents (Cargo.lock)
Mitigations
Upgrade 'zip' crate to 9.0.5.
CVE-2026-115905