Vulnerability · Published Mar 13, 2026 · Assigned by GitHub_M
CVE-2026-32630file-type affected by ZIP Decompression Bomb DoS via [Content_Types].xml entry
Medium 5.3
In plain English
A medium-severity security flaw in file-type from sindresorhus. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
file-type detects the file type of a file, stream, or data. From 20.0.0 to 21.3.1, a crafted ZIP file can trigger excessive memory growth during type detection in file-type when using fileTypeFromBuffer(), fileTypeFromBlob(), or fileTypeFromFile(). The ZIP inflate output limit is enforced for stream-based detection, but not for known-size inputs. As a result, a small compressed ZIP can cause file-type to inflate and process a much larger payload while probing ZIP-based formats such as OOXML. This vulnerability is fixed in 21.3.2.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | file-type | 21.3.2 | GHSA-j47w-4g3g-c36v |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| sindresorhus | file-type | >= 20.0.0, < 21.3.2 |
Weakness: CWE-409 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L