Skip to main content

zip2 Rust Crate EUVDEUVD-2026-109981

| CVE-2026-115905 CRITICAL
Improper Input Validation (CWE-20)
2026-10-26 GitHub_M GHSA-m665-v7pm-7grj
10.0
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft dual-header ZIP (benign CDFH, malicious LFH)
  2. Delivery
    Upload past CDFH-based security gateway
  3. Exploit
    Backend extracts archive via ZipStreamReader
  4. Execution
    LFH filename redirects write to target path
  5. Persist
    Attacker content overwrites critical script/binary
  6. Impact
    Scheduled or service execution yields RCE and DoS

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires the consuming application to extract untrusted ZIP archives using the streaming ZipStreamReader (zip::unstable::stream), which writes files to disk using the unverified Local File Header filename; the standard random-access ZipArchive API, which reads the authoritative Central Directory, is not affected. The full security-control-bypass scenario additionally requires a decoupled deployment where an upstream component inspects the archive with a Central-Directory-first parser (ZipArchive or an equivalent AV/CDR/WAF scanner) and then hands the same archive to a ZipStreamReader-based extractor without enforcing header consistency. Limiting factors: ZipStreamReader is an explicitly unstable API, so default extraction patterns are typically unaffected; the attacker-chosen overwrite path must be reachable/writable by the extracting process; reaching RCE requires the overwritten file to be subsequently executed; and the crafted archive must be deliverable to the extraction pipeline, which in many real deployments is an authenticated upload endpoint.

Impact

Signals point to a genuinely high-priority but conditionally-exploitable flaw rather than a universal 10.0 emergency. The vendor/advisory CVSS 4.0 of 10.0 (AV:N/AC:L/PR:N/UI:N with VC:H/VI:H/VA:H/SC:H/SI:H/SA:L) assumes both a specific decoupled architecture (a CDFH-first scanner validating the archive separately from extraction) and downstream execution of an overwritten file to reach RCE. The reliable, directly-demonstrated primitive is a parser differential producing arbitrary file overwrite - Integrity and Availability impact - while the claimed Confidentiality/RCE (VC:H/SC:H) is an indirect consequence that requires an overwritten script or binary to subsequently execute. The SSVC/priority Decision label is act_now and a complete reproducible PoC is published, which justifies prompt patching; however, no EPSS score was provided and the CVE is not in CISA KEV, so there is no evidence of widespread active exploitation at analysis time - the urgency derives from severity plus public PoC, not confirmed in-the-wild use. Important scope caveat: only applications extracting untrusted archives via the streaming ZipStreamReader (zip::unstable::stream) are affected; the common random-access ZipArchive path is not, so the headline 10.0 overstates real-world risk for most consumers of the crate. Conflict to note: the 'Information Disclosure' tag contradicts the actual integrity/overwrite nature of the bug.

Exploit ScenarioDerived

An attacker crafts a single-entry ZIP whose Central Directory declares a benign name (e.g. doc_report.pdf) while the Local File Header declares a sensitive path (e.g. cron_worker.sh). An upload gateway that inspects the archive with ZipArchive (central-directory authoritative) sees only the benign PDF and approves it, but a backend worker extracting with ZipStreamReader writes using the Local File Header name, overwriting the targeted file with attacker content. A complete, reproducible proof-of-concept integration test demonstrating this full gateway-bypass → overwrite → RCE/DoS chain is embedded in the GHSA advisory.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 26, 2026

A parser differential in the Rust zip crate (zip2) through 9.0.4 lets a crafted archive present different filenames to different readers: the random-access ZipArchive API trusts the Central Directory File Header while the unstable streaming ZipStreamReader extracts using the unverified Local File Header name, writing to an attacker-chosen path without reconciling the two. Applications that scan uploads with a Central-Directory-first tool and then extract with the streaming reader can be tricked into overwriting files on disk, giving integrity and availability impact and potentially code execution if the overwritten file is later executed. The advisory includes a public proof-of-concept integration test with claimed verified execution output, but there is no CISA KEV listing and no confirmed report of exploitation in the wild; exploitation is conditional on the consuming application actually using the unstable streaming API in a decoupled scan-then-extract pipeline.

RemediationAI

Upgrade the zip crate to 9.0.5 (release https://github.com/zip-rs/zip2/releases/tag/v9.0.5, fixing commit 8068ab480ccf8daa7411424e365fcdbe6d09443e) and rebuild dependents; the advisory at https://github.com/zip-rs/zip2/security/advisories/GHSA-m665-v7pm-7grj documents the dual-header issue. Where an immediate upgrade is not possible, stop passing untrusted archives to ZipStreamReader and extract with the random-access ZipArchive API instead, which reads the Central Directory, accepting the trade-off that fully streaming extraction of large or non-seekable archives is no longer possible. On 9.0.5 the fix adds a ZipReadOptions::enforce_header_consistency setting that rejects entries whose local header name, UnicodePath CRC, or size/CRC metadata disagree with the central directory; enabling it is the durable mitigation, with the caveat that legacy archives containing benign header mismatches will now fail to open. Because the exploit chain depends on a scanner inspecting a different header than the extractor, pipelines should not decouple inspection from extraction, and extraction destinations should be restricted to directories where the extracting process cannot overwrite service scripts or configuration; this only reduces blast radius and does not substitute for the patched version.

Affected VersionsENISA

zip2 < 9.0.5

Affected Packages

cargo zip fix: 9.0.5
euvd zip2 fix: 9.0.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in cargo, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The PKWARE ZIP format stores each entry's metadata twice: a Local File Header (LFH) immediately preceding the compressed payload, and a Central Directory File Header (CDFH) in the index at the end of the archive. In zip2, src/read/zip_archive.rs populates SharedBuilder.files purely from the central directory and ignores the LFH filename, whereas src/read/stream.rs (ZipStreamReader::visit / extract) parses entries sequentially with read_zipfile_from_stream and calls safe_prepare_path plus File::create on the LFH-declared name with no cross-check against the central directory. The crate also exposes shallow_copy_file in src/write.rs, which can deliberately create this dual-header desynchronization by adding a CDFH alias for an existing payload. The root cause is an interpretation conflict between two metadata sources (CWE-20 improper input validation, classified in the advisory as CWE-436), i.e. a classic archive cloaking/parser-differential issue rather than a memory-safety bug. The upstream fix in 9.0.5 adds an enforce_header_consistency option to ZipReadOptions and a HeaderConsistencyMetadata/HeaderDataDescriptorMetadata comparison that rejects archives whose LFH name, UnicodePath (0x7075) CRC, or CRC32/compressed/uncompressed sizes disagree with the central directory.

Know when Rust gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 10.0 CRITICAL
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
vuln.today AI 10.0 CRITICAL

Archive is crafted deterministically and delivered remotely (AV:N/AC:L) with no target privileges (PR:N); overwriting files owned by other components is a scope change (S:C); impact is file overwrite (I:H) and service destruction (A:H), confidentiality only via downstream execution (C:L).

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:H/SC:N/SI:H/SA:L

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
Low

Lifecycle Timeline

2
Patch available
Oct 26, 2026 - 17:02 EUVD
CVE Published
Oct 26, 2026 - 16:24 cve.org
CRITICAL 10.0

DescriptionCVE.org

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.

Technical POC Analysis

The bug is a parser differential / interpretation conflict (CWE-436; the advisory also classifies it as CWE-20 Improper Input Validation) between two readers in the Rust zip crate (zip2).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A critical vulnerability in the Rust zip crate (through 9.0.4) allows crafted archives to bypass security scans by presenting different filenames to different readers, enabling attackers to overwrite arbitrary files. This puts any application using the unstable streaming API in a decoupled scan-then-extract pipeline at risk of integrity and availability loss, and potentially remote code execution if overwritten files are later executed. Leadership should prioritize patching because exploitation, while not yet observed in the wild, has a public proof-of-concept and affects a widely used library.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
very popular Rust ZIP crate, but vulnerable streaming extractor is a non-default unstable API
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

More in Rust

View all
CVE-2024-3566 CRITICAL POC
9.8 Apr 10

Command injection via Windows CreateProcess argument parsing affects multiple language runtimes and tooling (Node.js, PH

CVE-2021-31162 CRITICAL POC
9.8 Apr 14

In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the ele

CVE-2021-28879 CRITICAL POC
9.8 Apr 11

In the standard library in Rust before 1.52.0, the Zip implementation can report an incorrect size due to an integer ove

CVE-2026-58491 CRITICAL POC
9.3 Sep 21

Stored cross-site scripting and open redirect in Warpgate's SSO endpoints (versions prior to 0.25.5) allow an unauthenti

CVE-2021-29922 CRITICAL POC
9.1 Aug 07

library/std/src/net/parser.rs in Rust before 1.53.0 does not properly consider extraneous zero characters at the beginni

CVE-2026-77620 HIGH POC
8.7 Sep 22

Denial of service in the Vector observability pipeline's `logstash` source (versions 0.15.0 through 0.56.x) allows a rem

CVE-2019-12083 HIGH POC
8.1 May 13

The Rust Programming Language Standard Library 1.34.x before 1.34.2 contains a stabilized method which, if overridden, c

CVE-2026-96889 HIGH POC
7.8 Sep 23

Use-after-free in librsvg during rendering of crafted SVG documents with nested XInclude directives and duplicate entity

CVE-2021-28878 HIGH POC
7.5 Apr 11

In the standard library in Rust before 1.52.0, the Zip implementation calls __iterator_get_unchecked() more than once fo

CVE-2021-28875 HIGH POC
7.5 Apr 11

In the standard library in Rust before 1.50.0, read_to_end() does not validate the return value from Read in an unsafe c

CVE-2019-16760 HIGH POC
7.5 Sep 30

Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration

CVE-2024-24576 CRITICAL POC
10.0 Apr 09

Rust is a programming language. Rated critical severity (CVSS 10.0), this vulnerability is remotely exploitable, no auth

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy