CVE-2026-114103
adm-zip: getDataAsync() bypasses the maxOutputLength size guard enforced by the synchronous getData() path
Description
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 undefined
Impact
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.
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » adm-zipvia npm adm-zip | < 0.6.1 | 0.6.1 |
| org.webjars » adm-zipvia npm adm-zip | < 0.6.1 | 0.6.1 |
| org.webjars.npm » adm-zipvia npm adm-zip | < 0.6.1 | 0.6.1 |
Blast radius
40% of the dependent artifacts (2) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 13 |
Most used dependents
- org.webjars.npm » phantomjs7 usages
- org.webjars.npm » protractor4 usages
- org.webjars.npm » selenium-webdriver4 usages
- org.webjars.npm » phantomjs2-ext1 usages
- org.webjars.npm » phantomjs2.00 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Package | cthackers/adm-zip | github.com |
| Web | cthackers/adm-zip advisory GHSA-c6fg-446q-cg94 | github.com |
| Web | cthackers/adm-zip commit 4916006 | github.com |
| Web | cthackers/adm-zip release v0.6.1 | github.com |
