{"id":"CVE-2026-115905","kind":"vulnerability","aliases":["CVE-2026-115905"],"related":[],"title":"Rust zip crate: streaming reader writes attacker-chosen paths, overwriting files","description":"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.","summary":"The Rust zip crate's ZipStreamReader extracts files using Local File Header names while ZipArchive uses Central Directory names, so a crafted archive can make a streaming extractor write a different path and content than a scanner inspecting the archive would see. An attacker can thereby overwrite files that a downstream service relies on.","severity":"critical","cvss":10.0,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["cargo","package","rust","zip"],"not_affected_if":["no-untrusted-archives","uses-ziparchive-only"],"how_to_check":"- Check the locked version of the `zip` crate in `Cargo.lock` (e.g. `grep -A1 'name = \"zip\"' Cargo.lock`); versions through `9.0.4` are affected\n- Find code that uses `ZipStreamReader` from `src/read/stream.rs` to extract untrusted archives","fix":"- Upgrade the `zip` crate to `9.0.5` or later\n- Until upgraded, avoid `ZipStreamReader` for untrusted archives and use `ZipArchive` with validated paths","status":"open","published_at":"2026-10-26T17:17:17+00:00","first_seen_at":"2026-10-26T17:31:22+00:00","triaged_at":"2026-10-26T17:33:03+00:00","updated_at":"2026-10-26T17:33:03+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-26T17:33:03Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade the `zip` crate to `9.0.5` or later\n- Until upgraded, avoid `ZipStreamReader` for untrusted archives and use `ZipArchive` with validated paths","reach":"unknown","title":"Rust zip crate: streaming reader writes attacker-chosen paths, overwriting files","impact":"high","summary":"The Rust zip crate's ZipStreamReader extracts files using Local File Header names while ZipArchive uses Central Directory names, so a crafted archive can make a streaming extractor write a different path and content than a scanner inspecting the archive would see. An attacker can thereby overwrite files that a downstream service relies on.","category":"package","nicknames":[],"who_cares":["rust","zip","cargo"],"confidence":0.7,"needs_auth":"unknown","worst_case":"Attacker overwrites files used by a downstream service, possibly leading to code execution","analyst_note":"Sources list only NVD; confirm the advisory and the exact exploit conditions (e.g. whether an attacker-controlled archive is the only input needed) at the upstream zip repository advisory.","how_to_check":"- Check the locked version of the `zip` crate in `Cargo.lock` (e.g. `grep -A1 'name = \"zip\"' Cargo.lock`); versions through `9.0.4` are affected\n- Find code that uses `ZipStreamReader` from `src/read/stream.rs` to extract untrusted archives","needs_analyst":true,"not_affected_if":["no-untrusted-archives","uses-ziparchive-only"],"who_is_affected":"Applications written in Rust that use the zip crate's streaming reader (ZipStreamReader) to extract ZIP archives that come from untrusted sources. Code that only uses ZipArchive for reading, or that never processes untrusted archives, is less exposed. Teams that do not build Rust software can skip it.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000685,"input_tokens":3392,"output_tokens":692,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-115905':15A,18A '-2026':14A,17A '9.0.4':92C '9.0.5':161C 'appear':122C 'archiv':45B,62B,119C 'attack':8A,66B,142C 'attacker-chosen':7A 'attacker-select':141C 'authorit':101C 'benign':123C 'cargo':19B 'caus':133C 'central':39B,95C,130C 'chosen':9A 'compon':126C 'content':56B,146C 'craft':44B,118C 'crate':3A,26B 'cve':13A,16A 'differ':53B,140C 'directori':40B,96C,131C 'downstream':73B,153C 'duplic':113C 'extract':29B,104C 'extractor':50B,136C 'file':12A,30B,33B,70B,90C,97C,107C,149C 'filenam':99C,109C 'fix':158C 'header':34B,98C,108C 'inspect':60B,128C 'issu':156C 'librari':80C 'local':32B,106C 'make':47B 'metadata':114C 'name':35B,41B 'overwrit':11A,69B,148C 'packag':20B 'path':10A,54B,144C 'potenti':147C 'read':85C 'reader':5A 'reconcil':111C 'reli':75B 'rust':1A,21B,24B,82C 'scanner':59B 'see':64B 'select':143C 'servic':74B,154C 'simpl':88C 'src/read/stream.rs':116C 'stream':4A,49B,135C 'support':84C 'therebi':68B 'therefor':121C 'treat':94C 'use':31B,38B,105C,150C 'version':160C 'without':110C 'would':63B 'write':6A,51B,87C,138C 'zip':2A,22B,25B,76C,79C,89C 'ziparch':37B,93C 'zipstreamread':28B,103C","nicknames":[],"mitigations":[],"who_affected":"Applications written in Rust that use the zip crate's streaming reader (ZipStreamReader) to extract ZIP archives that come from untrusted sources. Code that only uses ZipArchive for reading, or that never processes untrusted archives, is less exposed. Teams that do not build Rust software can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-26T17:17:17+00:00","kev":null,"cvss_vector":"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","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-115905","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115905","severity":null,"published_at":"2026-10-26T17:17:17+00:00","modified_at":"2026-10-26T17:17:17+00:00","first_seen_at":"2026-10-26T17:31:22+00:00","fetched_at":"2026-10-26T17:31:22+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}