GHSA-c6fg-446q-cg94: adm-zip: getDataAsync() bypasses the maxOutputLength size guard enforced by the synchronous getData() path
Summary adm-zip enforces a maxOutputLength guard against decompression bombs on its synchronous getData() path, but the equivalent asynchronous getDataAsync() path does not enforce it — it accumulates and returns the entire decompressed output regardless of the entry's declared size.
Published Sep 29, 2026
Affected packages
adm-zip
- Ecosystem
- npm
- Affected
- <= 0.6.0
- Fixed in
- 0.6.1
- Check
npm ls adm-zip
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
adm-zip enforces a maxOutputLength guard against decompression bombs on its synchronous getData() path, but the equivalent asynchronous getDataAsync() path does not enforce it — it accumulates and returns the entire decompressed output regardless of the entry's declared size. An application that checks an entry's declared size before deciding to process it, then reads the entry via getDataAsync() (a completely ordinary, often-recommended choice for I/O in Node.js), gets none of the protection it believes it has.
Details
methods/inflater.js:3-10passes{maxOutputLength: expectedLength}toinflateRawSync, which Node enforces.methods/inflater.js:12-31passes the same option tocreateInflateRawbut never enforces it on the streaming path — it just accumulates every chunk and allocates a final Buffer of whatever size resulted.
PoC
const AdmZip = require('adm-zip');
const zip = new AdmZip();
zip.addFile('p', Buffer.alloc(64 * 1024 * 1024, 0x41)); // 64 MiB
const raw = Buffer.from(zip.toBuffer());
// patch the local + central declared uncompressed size to 1 byte
raw.writeUInt32LE(1, localHeaderSizeOffset);
raw.writeUInt32LE(1, centralHeaderSizeOffset);
const entry = new AdmZip(raw).getEntry('p');
entry.getData();
// throws: ERR_BUFFER_TOO_LARGE: Cannot create a Buffer larger than 1 bytes
entry.getDataAsync((data, error) => { ... });
// returns the full 67,108,864-byte buffer, error is undefinedImpact
An application that validates a declared size before reading an entry, then uses the async API, gets no protection against a high-ratio DEFLATE payload. Repeated or larger requests could contribute to memory exhaustion.
Credited to zikk090.
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-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, 2026CVE-2026-76845
adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite
medium6.5No fixAug 24, 2026
