Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. adm-zip
  4. ›
  5. GHSA-rcw4-f5rp-g42v

GHSA-rcw4-f5rp-g42v: adm-zip: Decompression-bomb protection (fix for CVE-2026-39244) can be bypassed by declaring uncompressed size as 0

September 29, 2026

The fix shipped for CVE-2026-39244 (methods/inflater.js) caps zlib’s decompression output via maxOutputLength: expectedLength, where expectedLength is read directly from the ZIP entry’s attacker-controlled “uncompressed size” header field (CENLEN/LOCLEN). This cap is only applied when expectedLength > 0:

const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {};
return zlib.inflateRawSync(inbuf, option);

If an attacker sets the declared uncompressed-size field to exactly 0, this condition is false, option becomes {}, and no output cap is passed to zlib at all. Node then falls back to zlib’s own internal default limit (several GB), so a small, highly-compressible payload can still be decompressed to a very large size in memory – the same class of resource-exhaustion issue the original CVE addressed, just triggered differently.

References

  • github.com/advisories/GHSA-rcw4-f5rp-g42v
  • github.com/cthackers/adm-zip/commit/491600683dacb6cb9fe0718a0eeb9cb5eb49afa6
  • github.com/cthackers/adm-zip/releases/tag/v0.6.1
  • github.com/cthackers/adm-zip/security/advisories/GHSA-rcw4-f5rp-g42v

Code Behaviors & Features

Detect and mitigate GHSA-rcw4-f5rp-g42v 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.1

Fixed versions

  • 0.6.1

Solution

Upgrade to version 0.6.1 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-409: Improper Handling of Highly Compressed Data (Data Amplification)

Source file

npm/adm-zip/GHSA-rcw4-f5rp-g42v.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Mon, 12 Oct 2026 00:22:34 +0000.