NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2022-36313 — file-type

MEDIUMFix: sindresorhus/file-type@2c4d120

CVE-2022-36313 is a medium-severity (CVSS 5.5) CWE-835 vulnerability in file-type. A fix is available for file-type — see the affected versions and patch details below.

file-type vulnerable to Infinite Loop via malformed MKV file

Also known asGHSA-mhxj-85r3-2x55
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 1, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2022-36313.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs35th percentile — riskier than 35% of all scored CVEsHighest risk
0.00%0.30%0.60%0.91%0.2%0.4%May 26Aug 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

4Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
file-typenpm
79.1Mdownloads / week

Description

An issue was discovered in the file-type package from 13.0.0 until 16.5.4 and 17.x before 17.1.3 for Node.js. A malformed MKV file could cause the file type detector to get caught in an infinite loop. This would make the application become unresponsive and could be used to cause a DoS attack when used on a web server.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmfile-type≥ 13.0.0&&< 16.5.416.5.4npm install file-type@16.5.4
📦npmfile-type≥ 17.0.0&&< 17.1.317.1.3npm install file-type@17.1.3

Affected Products

1 product · 2 configurations
Application
file-typesindresorhus
≥ 17.0.0 && < 17.1.3
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for file-type, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update file-type to 16.5.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-36313 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
Red Hat Data Grid 8.4.1file-typeRHSA-2023:0713

Frequently Asked Questions

An issue was discovered in the file-type package from 13.0.0 until 16.5.4 and 17.x before 17.1.3 for Node.js. A malformed MKV file could cause the file type detector to get caught in an infinite loop. This would make the application become unresponsive and could be used to cause a DoS attack when used on a web server.
O3 Security · Impact-Aware SCA

Is CVE-2022-36313 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2022-36313: file-type DoS — Fixed in 16.5.4