CVE-2026-39244

adm-zip: adm-zip: Denial of Service via crafted ZIP file leading to excessive memory allocation

Published Jul 10, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The flaw resides in the adm-zip JavaScript library prior to version 0.5.18. A crafted ZIP archive containing a central directory entry that declares an uncompressed size far larger than the actual compressed data causes the library to allocate a buffer based solely on that header value. This silent allocation occurs before CRC validation, allowing an attacker to trigger an extreme memory amplification—roughly a 33-million-to-1 ratio when the archive declares a 4 GB uncompressed size. All extraction and read APIs, including readFile(), extractEntryTo(), and test(), are susceptible, and the defect leads to an abrupt process crash, constituting a denial-of-service attack.

Affected Systems

Any application or service that imports and uses the adm-zip library to process ZIP files from untrusted sources is affected, provided the library version is earlier than 0.5.18. No specific vendors or product lineages are listed by the CNA.

Risk and Exploitability

The CVSS score of 7.5 indicates high severity. The EPSS score of < 1% and the absence from the CISA KEV catalog suggest that, at this time, there is no widespread exploitation evidence. Attackers can exploit the vulnerability by supplying a malicious ZIP file; the lack of bounds checking makes the exploitation path straightforward for any user of adm-zip. It is inferred that a single malicious ZIP file delivered in one request could trigger the crash if system resources are exhausted, but this inference is based on the described behavior rather than documented attacks.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade adm-zip to version 0.5.18 or later, which implements size validation during buffer allocation.
  • Validate the uncompressed size of each ZIP entry against a configuration‑defined maximum before allocating memory, and reject any entries that exceed the threshold.
  • Limit the total upload size or number of entries processed by adm-zip and consider performing extraction in a sandboxed or isolated environment to constrain impact.

Generated by OpenCVE AI on July 31, 2026 at 13:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-xcpc-8h2w-3j85 adm-zip: Crafted ZIP file triggers 4GB memory allocation
History
Type Values Removed Values Added
First Time appeared Cthackers
Cthackers adm-zip
Vendors & Products Cthackers
Cthackers adm-zip
Type Values Removed Values Added
Title adm-zip: adm-zip: Denial of Service via crafted ZIP file leading to excessive memory allocation
Weaknesses CWE-409
References
Metrics threat_severity

None

threat_severity

Moderate

Type Values Removed Values Added
Title Memory Allocation Amplification Causes Denial of Service in adm-zip
Type Values Removed Values Added
Title Memory Allocation Amplification Causes Denial of Service in adm-zip
Type Values Removed Values Added
Title Denial of Service via Unvalidated Uncompressed Size in adm‑zip ZIP Extraction
Type Values Removed Values Added
Title Denial of Service via Unvalidated Uncompressed Size in adm‑zip ZIP Extraction
Type Values Removed Values Added
Weaknesses CWE-400
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
References
Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-409

    Improper Handling of Highly Compressed Data (Data Amplification)

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Jul 10, 2026, 6:10 PM
Reserved
Apr 6, 2026, 12:00 AM
Status
Deferred
Published
Jul 10, 2026, 5:16 PM
Modified
Jul 10, 2026, 7:17 PM
Severity
Moderate
Public date
Jul 10, 2026, 12:00 AM