file-type affected by ZIP Decompression Bomb DoS via [Content_Types].xml entry (sindresorhus file-type)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.32 % · percentile 25 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
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.
Weaknesses (CWE)
- CWE-409 — Improper Handling of Highly Compressed Data (Data Amplification)
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | GitHub_M |
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | NVD · security-advisories@github.com (Secondary) |
Advisories
- GHSA-j47w-4g3g-c36v — file-type: ZIP Decompression Bomb DoS via [Content_Types].xml entry
European references
- ENISA EUVD · EUVD-2026-12139
- GCVE · GCVE-0-2026-32630
Affected configurations (NVD CPE)
cpe:2.3:a:sindresorhus:file-type:*:*:*:*:*:node.js:*:*≥ 20.0.0 < 21.3.2
Affected products
| Product | Versions |
|---|---|
| sindresorhus · file-type | affected >= 20.0.0, < 21.3.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |