GHSA-xcpc-8h2w-3j85

Suggest an improvement
Source
https://github.com/advisories/GHSA-xcpc-8h2w-3j85
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-xcpc-8h2w-3j85/GHSA-xcpc-8h2w-3j85.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-xcpc-8h2w-3j85
Aliases
Downstream
CGA (42)
MINI (14)
Published
2026-07-10T18:32:19Z
Modified
2026-09-10T03:51:12Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
adm-zip: Crafted ZIP file triggers 4GB memory allocation
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-400",
        "CWE-789"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-17T21:50:08Z",
    "nvd_published_at":  "2026-07-10T17:16:57Z",
    "severity":  "HIGH"
}
References

Affected packages

npm / adm-zip

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.6.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-xcpc-8h2w-3j85/GHSA-xcpc-8h2w-3j85.json"