All vulnerabilities

crates.io

CVE-2026-115906

zip: AES Entry HMAC Authentication Bypass on Premature EOF

Severity
Medium 6.5
Published
29 Oct 2026
Last changed
17 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
9.0.0
Exploit chance
0.2% in the next 30 daysHigher than 9% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-1284CWE-354
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Change data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Also known as
GHSA-8hxf-qr8p-62x4, RUSTSEC-2026-0545
Sources
OSV.dev and GitHub

Description

An AES-encrypted (AE-x) entry's authentication code is verified only when the reader's byte counter lands exactly on zero. If the bounded entry reader reaches the archive's actual EOF before the attacker-controlled, header-declared compressed_size, the counter remains positive, the HMAC is never read or compared, and the truncated, unauthenticated plaintext is returned as a clean end of stream. A zero-payload entry also returns before authentication. An attacker who does not know the password can modify an archive so chosen or modified plaintext is accepted with no error.

src/aes.rs:246-292:

data_remaining starts at compressed_size - (2 + 10 + salt_length) (src/aes.rs:144-145), where compressed_size comes straight from the attacker-controlled central directory. Nothing cross-checks the declared data span against the archive's structural boundaries: ZipFileData::find_content() is just reader.take(self.compressed_size) (src/types.rs:214-223), and make_crypto_reader() passes the…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
zipcrates.io · osv:crates.io:zip
  • From 0.6.0 before 9.0.0

About zip

Downloads in the last 90 days (crates.io)
111,591,536crates.io, 23 Nov 2026
Total downloads (crates.io)
359,656,960crates.io, 23 Nov 2026

References