CVE-2026-32630Sindresorhus File-type
Medium 5.3 No auth needed
Follow: this CVE · Sindresorhus · Sindresorhus File-type We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Mar 16, 2026
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-409
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
What happens
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.
What to do
- Apply the vendor's security update for File-type.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | file-type |
≥ 20.0.0 < 21.3.2 |
21.3.2 |
npm install file-type@21.3.2 |
Per OSV / GitHub Advisories (GHSA-j47w-4g3g-c36v). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| sindresorhus | file-type | ≥ 20.0.0 < 21.3.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Exploit Vendor Advisory