Cthackers adm-zip
adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS)
adm-zip is a JavaScript library for creating and extracting ZIP archives in Node.js. Prior to 0.6.1, getData() in zipEntry.js trusts an entry's central-directory uncompressed size and allocates output memory before validating that value against the actual compressed data and decompression result. A small crafted ZIP can declare a multi-gigabyte uncompressed size, causing Buffer.alloc and decompression handling to commit excessive resident memory before CRC validation reports an error. Applications that read entries from untrusted archives can therefore be terminated by the operating system or suffer service-wide memory exhaustion. This issue is fixed in version 0.6.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.6.1
Fixed in 0.6.1
Mitigation
Upgrade adm-zip to 0.6.1 or later.
References
- Vendor advisory github.com/cthackers/adm-zip/security/advisori…
- Patch github.com/cthackers/adm-zip/commit/491600683d…
- Release notes github.com/cthackers/adm-zip/releases/tag/v0.6…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.