CVE-2026-115906

zip: AES Entry HMAC Authentication Bypass on Premature EOF

Published Oct 26, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
zip is a zip library for Rust that supports reading and writing simple ZIP files. From 0.6.0 until 9.0.0, the AES entry reader in src/aes.rs verifies its HMAC only when the attacker-controlled data counter reaches zero. If the underlying bounded reader reaches the real end of the archive while data_remaining is still positive, or if an encrypted entry has no payload, the reader can return a clean end of stream without reading and comparing the authentication tag. Applications using by_index_decrypt, by_name_decrypt, by_path_decrypt, or password-enabled by_index_with_options can therefore accept modified plaintext without an authentication error. This issue is fixed in version 9.0.0.

Analysis

AI-generated

Technical impact

The flaw lies in the AES entry reader’s HMAC verification logic. The library defers authentication until the internal data counter reaches zero; if the underlying reader reaches the real end of the archive before this occurs, the function may return a clean end‑of‑stream without comparing the authentication tag. The result is that an attacker can modify the encrypted payload, or supply an entry with no payload, and the library will accept it as valid. This bypass of HMAC checks constitutes an integrity failure, allowing undetected tampering of extracted files.

Affected Systems

The vulnerability affects the Rust zip‑rs/zip2 library, versions 0.6.0 through 9.0.0. Any use of the AES decryption APIs—by_index_decrypt, by_name_decrypt, by_path_decrypt, or password‑enabled by_index_with_options—exposes applications that import and use zip‑rs to ZIP archives containing AES‑encrypted entries.

Risk and Exploitability

The CVSS score of 6.5 indicates moderate severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV, meaning no widespread exploitation has been reported. The fault can be triggered when an application extracts an AES‑encrypted entry from a crafted ZIP archive. A local or remote attacker who can supply such an archive to an application that uses zip‑rs to read the file may modify the decrypted contents without triggering an authentication error. The risk is confined to the integrity of files extracted by the vulnerable library.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the zip‑rs/zip2 library to version 9.0.0 or later, which includes a fix that verifies the HMAC at the end of the file.
  • Recompile any dependent binaries to ensure they link against the corrected version and that encrypted entry API calls remain unchanged.
  • If upgrading is not immediately possible, disable AES entry support in the application or implement an explicit HMAC verification step after decryption to enforce integrity of extracted files.

Generated by OpenCVE AI on October 26, 2026 at 17:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-8hxf-qr8p-62x4 zip: AES Entry HMAC Authentication Bypass on Premature EOF
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Zip-rs
Zip-rs zip2
Vendors & Products Zip-rs
Zip-rs zip2
Type Values Removed Values Added
Description zip is a zip library for Rust that supports reading and writing simple ZIP files. From 0.6.0 until 9.0.0, the AES entry reader in src/aes.rs verifies its HMAC only when the attacker-controlled data counter reaches zero. If the underlying bounded reader reaches the real end of the archive while data_remaining is still positive, or if an encrypted entry has no payload, the reader can return a clean end of stream without reading and comparing the authentication tag. Applications using by_index_decrypt, by_name_decrypt, by_path_decrypt, or password-enabled by_index_with_options can therefore accept modified plaintext without an authentication error. This issue is fixed in version 9.0.0.
Title zip: AES Entry HMAC Authentication Bypass on Premature EOF
Weaknesses CWE-1284
CWE-354
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N'}

Weaknesses
  • CWE-1284

    Improper Validation of Specified Quantity in Input

  • CWE-354

    Improper Validation of Integrity Check Value

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 31, 2026, 1:32 AM
Reserved
Oct 23, 2026, 8:21 PM
Status
Awaiting Analysis
Published
Oct 26, 2026, 5:17 PM
Modified
Oct 31, 2026, 2:17 AM