zip: AES Entry HMAC Authentication Bypass on Premature EOF
At a glance
Severity
MEDIUM 6.5
EPSS
EPSS 0.15 % · percentile 4 (2026-10-28)
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Awaiting Analysis
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.