Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. adm-zip
  4. ›
  5. CVE-2026-39244

CVE-2026-39244: adm-zip: Crafted ZIP file triggers 4GB memory allocation

July 10, 2026 (updated July 17, 2026)

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

  • github.com/advisories/GHSA-xcpc-8h2w-3j85
  • github.com/cthackers/adm-zip/commit/2450dcf417aa29df49270237d18c5245794da3e2
  • github.com/cthackers/adm-zip/issues/568
  • github.com/cthackers/adm-zip/releases
  • nvd.nist.gov/vuln/detail/CVE-2026-39244

Code Behaviors & Features

Detect and mitigate CVE-2026-39244 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.6.0

Fixed versions

  • 0.6.0

Solution

Upgrade to version 0.6.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-789: Memory Allocation with Excessive Size Value

Source file

npm/adm-zip/CVE-2026-39244.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:24 +0000.