CVE-2026-39244: adm-zip: Crafted ZIP file triggers 4GB memory allocation
adm-zip before 0.5.18 is vulnerable to denial of service via a crafted ZIP file with a manipulated uncompressed size header field. In zipEntry.js line 103, Buffer.alloc(centralHeader.size) allocates memory based on the declared uncompressed size from the ZIP central directory header without validating it against the actual compressed data size or imposing any upper bound.
Published Jul 10, 2026 · Updated Jul 17, 2026
Affected packages
adm-zip
- Ecosystem
- npm
- Affected
- < 0.6.0
- Fixed in
- 0.6.0
- Check
npm ls adm-zip
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
adm-zip before 0.5.18 is vulnerable to denial of service via a crafted ZIP file with a manipulated uncompressed size header field. In zipEntry.js line 103, Buffer.alloc(_centralHeader.size) allocates memory based on the declared uncompressed size from the ZIP central directory header without validating it against the actual compressed data size or imposing any upper bound. The size value is read directly from the binary header at entryHeader.js line 266 with no bounds check. An attacker can craft a ~120-byte ZIP file that declares ~4GB uncompressed size, causing a memory allocation amplification ratio of over 33 million to 1. The allocation occurs before CRC validation, so the malicious payload cannot be rejected early. All extraction and read methods are affected: readFile(), readAsText(), extractEntryTo(), extractAllTo(), extractAllToAsync(), test(), and entry.getData(). Any application accepting untrusted ZIP files via adm-zip is vulnerable to immediate process crash.
Credited to julianladisch.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-102282
adm-zip extraction preserves SUID/SGID bits from untrusted ZIPs -> local privilege escalation
high7.1Sep 29, 2026GHSA-8238-w5pm-2374
adm-zip: Unhandled error event in async DEFLATE decompression crashes Node.js process (DoS)
high7.5Sep 29, 2026GHSA-c6fg-446q-cg94
adm-zip: getDataAsync() bypasses the maxOutputLength size guard enforced by the synchronous getData() path
medium5.3Sep 29, 2026GHSA-p634-w6r4-rjp2
adm-zip: Duplicate ZIP entry names: getEntry() and extractAllTo() resolve to different content
medium5.9Sep 29, 2026GHSA-rcw4-f5rp-g42v
adm-zip: Decompression-bomb protection (fix for CVE-2026-39244) can be bypassed by declaring uncompressed size as 0
high7.5Sep 29, 2026CVE-2026-77301
adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS)
high7.5Sep 18, 2026
