Visit the Wiz Whimzical Shop at AWS re:Invent
Vulnerability DatabaseGHSA-w972-8m6f-772m

GHSA-w972-8m6f-772m: 
Rust vulnerability analysis and mitigation

Summary

A crafted ZIP file makes ZipArchive::new run for seconds to minutes. A 99 KB file takes 8 seconds and a 400 KB file takes 4 minutes. The call ends in an error, so the caller gets nothing back and can't stop it early. Spreadsheets and Word documents are ZIP files too: calamine, docx-rs and umya-spreadsheet all stall on the same file. It affects 9.5.1, the latest release, and every release back to 2.2.2, with default features and settings. master (2b9a0e5c5) is the same. It's a denial of service. I'd rate it High (CVSS 3.1 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), the vector you used for GHSA-9hj8-73fh-9963.

Details

find_central_directory_end tries every EOCD signature near the end of the file. For one that may be ZIP64, it looks for the ZIP64 EOCD record anywhere between the locator's offset and the locator. A crafted locator sets that offset to 0, so the whole file is searched. Three things multiply:

  1. Every ZIP64 record is tried for every EOCD (the loop at find_central_directory.rs:445). The cache from #1142 stopped the rescanning, not the reparsing.
  2. Each try reads the record's extensible data first. Zip64CentralDirectoryEnd::parse allocates and reads record_size - 44 bytes (blocks.rs:538) before the exact-length check rejects the record (find_central_directory.rs:349).
  3. Records overlap. A ZIP64 signature fits every 12 bytes and an EOCD every 24, and bytes 4 to 24 of each EOCD double as the next one's locator. So each of up to about 2,700 EOCDs costs work in L², where L is the file size. This started in 2.2.2 with #247: on the same 99 KB file, 2.2.1 takes 0.2 s and 2.2.2 takes 7.7 s.

Impact

Spreadsheets, Word documents, EPUBs and JAR files are all ZIP archives, so this reaches well past code that thinks of itself as unzipping. I opened the 99 KB file with three crates that read Office files, using each one's normal open call:

Cratezip versionCallTime
calamine 0.38.09.5.1open_workbook_auto_from_rs23 s
docx-rs 0.4.228.6.0read_docx7.9 s
umya-spreadsheet 3.1.18.6.0reader::xlsx::read_reader7.8 s
calamine takes three times as long because it tries xlsx, xlsb and ods in turn, and each attempt opens the ZIP again.
So an attacker needs only an upload form, such as a spreadsheet import or a document preview. A 400 KB file holds a CPU core for 4 minutes, and one upload per core keeps every core busy for that long. If the server opens files inside an async handler, each upload also blocks a runtime worker, so the same handful of uploads stops it answering anyone. Nothing in the library protects the caller: the default settings are enough, the error comes back only after the time is spent, and limits on entry count or extracted size never get a chance to run.
ZipWriter::new_append and zip::unstable::read::ZipIterable::try_new run the same search (7.9 s on the 99 KB file).
Workarounds: opening with Config { archive_offset: ArchiveOffset::Known(x) } takes 3.6 ms on the 99 KB file, because it tries only one ZIP64 position. It requires that there be exactly x bytes of non-ZIP data before the first file in the archive. read_zipfile_from_stream and ZipStreamReader::new are similarly fast, and require that the reader already be positioned at the first file.

Source: NVD

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-w972-8m6f-772mHIGH7.5
  • Rust logoRust
  • zip
NoYesNov 30, 2026
CVE-2026-140014MEDIUM6.5
  • Rust logoRust
  • cookie
NoYesNov 30, 2026
GHSA-cqjm-xhf9-q2m4LOWN/A
  • Rust logoRust
  • reed-compiler
NoYesNov 30, 2026
GHSA-6qq4-4fc2-69v4MEDIUMN/A
  • Rust logoRust
  • reed-compiler
NoYesNov 30, 2026
GHSA-2q5f-w9jv-ghvgMEDIUMN/A
  • Rust logoRust
  • reed-compiler
NoYesNov 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management