adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS)
CVE-2026-77301 (GitHub advisory GHSA-7q85-xj36-vmfc) is a high-severity vulnerability with a CVSS 3.1 base score of 7.5, classed as Memory Allocation with Excessive Size Value (CWE-789), in adm-zip (npm). Affected versions: < 0.6.1. It is fixed in 0.6.1.
Published 18 Sept 2026Updated 18 Sept 2026
- CVE ID
- CVE-2026-77301
- GHSA ID
- GHSA-7q85-xj36-vmfc
- EPSS
- 0.41%higher than 35% of CVEs
- Weakness (CWE)
- CWE-789Memory Allocation with Excessive Size Value
- KEV status
- Not in KEV
- Published
- 18 Sept 2026
- Updated
- 18 Sept 2026
- Ecosystem
- npm
- Assigned by (CNA)
- GitHub_M
Summary
Source: OSV (GitHub advisory)
adm-zip allocates an entry's output buffer from the declared uncompressed size (central-directory size field) before validating it against the actual data. A tiny crafted ZIP that declares a huge uncompressed size forces a multi-gigabyte allocation from a few bytes.
Impact
On adm-zip 0.5.17 (latest), Node 24, a 105-byte ZIP with one stored entry declaring size = 1,774,399,200 makes new AdmZip(buf).getEntries()[0].getData() commit ~1.8 GB of resident memory in ~4.4 s before throwing Error: ADM-ZIP: CRC32 checksum failed, roughly 16 million times the input size. Because the buffer is committed before any validation, on a memory-constrained host (containers, serverless, small VMs) the allocation OOM-kills the process before the CRC check (uncatchable), and concurrent requests can exhaust memory even on larger hosts. Any service that reads entries from untrusted ZIPs is exposed to a remote denial of service.
Steps to reproduce
Attachments are not supported in the advisory form, so the 105-byte PoC (sha256 980d34356fbb248fe527b9d0ac3eabc5c99393a374014be6199523de16709386) is inlined as base64 in this self-contained reproducer:
const AdmZip = require('adm-zip');
// 105-byte crafted ZIP, base64-inlined
// sha256 980d34356fbb248fe527b9d0ac3eabc5c99393a374014be6199523de16709386
const b64 = "UEsDBBQAAAAAAAAAAAAAAAAABQAAAAUAAAABAAAAYWhlbGxvUEsBAhQAFAAAAAAAAAAAAAAAAAAFAAAA4C7DaQEAAAAAAAAAAAAAAAAAAAAAAGFQSwUGAAAAAAEAAQAvAAAAJAAAAAAA";
const buf = Buffer.from(b64, "base64"); // 105 bytes
const zip = new AdmZip(buf);
zip.getEntries()[0].getData(); // commits ~1.8 GB, then throws "ADM-ZIP: CRC32 checksum failed"
The single entry declares uncompressed size = 1,774,399,200 with a compressed size of 5. getData() allocates the full declared size before the CRC check runs, so the memory is committed regardless of the (tiny) actual payload.
Root cause
zipEntry.js does Buffer.alloc(<declared uncompressed size>) before checking the declared size against the compressed size / available bytes.
Suggested fix
Validate the declared uncompressed size against the compressed size and a configurable maximum before allocating (yauzl, for example, requires the caller to bound this); reject or stream when the declared size is implausible relative to the input. Happy to send a patch.
Technical details
Source: GitHub Advisory Database
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HHigh7.5Base score from GitHub Advisory Database
- Attack Vector AV
- Network
- Attack Complexity AC
- Low
- Privileges Required PR
- None
- User Interaction UI
- None
- Scope S
- Unchanged
- Confidentiality C
- None
- Integrity I
- None
- Availability A
- High
CISA SSVC decision points
- Exploitation
- poc
- Proof-of-concept code is public
- Automatable
- yes
- Attackers can automate this at scale
- Technical impact
- partial
- Limited control of the affected system
CISA Coordinator assessment (SSVC 2.0.3) via CVE.org.
Affected packages
Source: OSV (GitHub advisory)
- adm-zipnpm
pkg:npm/adm-zip- Affected versions
- < 0.6.1
- Fixed in
- 0.6.1
| Package | Affected versions | Fixed in |
|---|---|---|
adm-zip npm pkg:npm/adm-zip |
|
|
Fix
Source: OSV (GitHub advisory)
Fix available
Upgrade to 0.6.1 or later.
Patch commits
Enforced the decompression size cap on the async path and for size 0
+26 −7 across 2 files
- methods/inflater.js+25 −7
- util/errors.js+1 −0
Release commits
The commits each fixed release tag points at. They usually bump the version rather than contain the fix itself.
Vulnerability intelligence
Root cause analysis
Vulnerable functions
References
Advisories 4
Package 1
Other links 1
Credits
- joszamamareporter
Questions about CVE-2026-77301
- What is the GHSA ID for CVE-2026-77301?
- GitHub tracks CVE-2026-77301 as GHSA-7q85-xj36-vmfc.
- What is the CVSS score of CVE-2026-77301?
- CVE-2026-77301 has a CVSS 3.1 base score of 7.5 (High), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
- Which versions are affected by CVE-2026-77301?
- adm-zip (npm): < 0.6.1.
- How do I fix CVE-2026-77301?
- Upgrade to 0.6.1 or later. The fix is in commit 4916006.
- What is the Package URL (PURL) for CVE-2026-77301?
- The affected package's PURL is pkg:npm/adm-zip.
- Is CVE-2026-77301 exploited in the wild?
- CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2026-77301. That means no confirmed exploitation has been catalogued, not that it is safe to leave unpatched. CISA's SSVC assessment rates exploitation as "poc". EPSS estimates a 0.41% chance of exploitation in the next 30 days, higher than 35% of CVEs.
Data sources
Upstream records
- OSV (GitHub advisory)LoadedRaw JSON
- GitHub Advisory DatabaseLoadedRaw JSON
- OSV (CVE record)LoadedRaw JSON
- CVE.orgLoaded
- CISA KEV catalogLoaded
Fetched 5 days ago (8 Oct 2026, 22:37 UTC). Records refresh automatically after 24 hours.
Where each part of this page came from
- Title and description
- OSV (GitHub advisory)
- Severity score
- GitHub Advisory Database
- Weakness (CWE)
- GitHub Advisory Database
- Affected packages
- OSV (GitHub advisory)
- Fix
- OSV (GitHub advisory)
- References
- Computed by CVEminer
- SSVC
- CVE.org
- KEV status
- CISA KEV catalog
- EPSS
- GitHub Advisory Database
OSV and GitHub Advisory Database content is licensed CC BY 4.0. Values marked as computed or derived were calculated by CVEminer from the upstream data.