CVE-2026-77301: adm-zip Uncontrolled Memory Allocation Vulnerability Leading to Denial of Service
Summary
CVE-2026-77301: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS). Affects adm-zip versions < 0.6.1. Fixed in 0.6.1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
adm-zip is a popular Node.js package used for reading and writing ZIP files. It allows developers to easily manipulate ZIP archives in their applications. However, it has a critical vulnerability that can lead to uncontrolled memory allocation, which poses a significant risk to applications that handle untrusted ZIP files.
Vulnerability Detail
The vulnerability arises from adm-zip's method of allocating memory for an entry's output buffer based on the declared uncompressed size in the ZIP file's central directory. This allocation occurs before validating the declared size against the actual data, allowing an attacker to craft a small ZIP file that declares a massive uncompressed size. For instance, a 105-byte ZIP can trigger a memory allocation of approximately 1.8 GB, leading to potential out-of-memory (OOM) errors on memory-constrained systems. This can result in a denial of service, as the application may crash or become unresponsive due to excessive memory consumption.
How To Fix
Latest published version: 0.6.1 as of 23 Oct 2026
npm install adm-zip@0.6.1
The newest release already contains this fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can implement input validation to reject ZIP files with implausible declared sizes before passing them to adm-zip. This can help mitigate the risk of memory exhaustion. Here is a sample code snippet for validation:
const AdmZip = require('adm-zip');
function validateZip(buffer) {
const zip = new AdmZip(buffer);
const entries = zip.getEntries();
for (const entry of entries) {
if (entry.data.length > MAX_SIZE) {
throw new Error('Invalid ZIP entry size');
}
}
return zip;
}
const MAX_SIZE = 104857600; // Example max size of 100 MB
Conclusion
In summary, CVE-2026-77301 is a critical vulnerability in the adm-zip package that can lead to denial of service through uncontrolled memory allocation. It is essential to update to the patched version 0.6.1 or later to mitigate this risk. Additionally, implementing input validation can serve as a temporary workaround.
See every vulnerability recorded for adm-zip →
FAQ
CVE-2026-77301 is a vulnerability in the adm-zip package that allows for uncontrolled memory allocation, leading to potential denial of service.
If your application uses adm-zip to process untrusted ZIP files, it may be susceptible to denial of service attacks due to excessive memory consumption.
The vulnerability affects adm-zip versions prior to 0.6.1.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without signup.
The CVSS score for this vulnerability is 7.5, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for adm-zip.