Live threats

All CVEs / Sindresorhus

CVE-2026-32630Sindresorhus File-type

Medium 5.3 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for File-type.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
sindresorhusfile-type≥ 20.0.0 < 21.3.2

Official sources

References

Links published by the sources. Open them with care.