Read the docs
TI-2026-24363 Aliases CVE-2026-31808GHSA-5v7r-6r5c-r473

file-type affected by infinite loop in ASF parser on malformed input with zero-size sub-header

Priority LOW 30CWE-835Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · Low
Fix status
Partial Red Hat: 9 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-835.

Summary

file-type detects the file type of a file, stream, or data. Prior to 21.3.1, a denial of service vulnerability exists in the ASF (WMV/WMA) file type detection parser. When parsing a crafted input where an ASF sub-header has a size field of zero, the parser enters an infinite loop. The payload value becomes negative (-24), causing tokenizer.ignore(payload) to move the read position backwards, so the same sub-header is read repeatedly forever. Any application that uses file-type to detect the type of untrusted/attacker-controlled input is affected. An attacker can stall the Node.js event loop with a 55-byte payload. Fixed in version 21.3.1.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00369 30th percentileScored 2026-11-07
Fix Partial file-type (sindresorhus): 21.3.1file-type (npm): 21.3.1Red Hat: 9 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
sindresorhusfile-type13.0.0 to before 21.3.121.3.1Patch availableCNA
—file-type (npm)13.0.0 to before 21.3.121.3.1Patch availableGHSA-5v7r-6r5c-r473
  • file-type Vendorsindresorhus Affected 13.0.0 to before 21.3.1 Fixed in 21.3.1 Patch available CNA
  • file-type (npm) Vendor— Affected 13.0.0 to before 21.3.1 Fixed in 21.3.1 Patch available GHSA-5v7r-6r5c-r473

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:sindresorhus:file-type:*:*:*:*:*:node.js:*:*13.0.0 to before 21.3.1Vulnerablesindresorhus
  • cpe:2.3:a:sindresorhus:file-type:*:*:*:*:*:node.js:*:* Versions 13.0.0 to before 21.3.1 Vulnerable ·sindresorhus

Remediation

  • Fix · CNA file-type (sindresorhus) Fixed in 21.3.1
  • Fix · GHSA-5v7r-6r5c-r473 file-type (npm) Fixed in 21.3.1 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Cryostat 4AffectedNo fix yet: Fix deferred
Logging Subsystem for Red Hat OpenShiftAffectedNo fix yet: Fix deferred
Red Hat Data Grid 8AffectedNo fix yet: Fix deferred
Red Hat Developer Hub 1AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3AffectedNo fix yet: Fix deferred
Red Hat OpenShift Dev SpacesAffectedNo fix yet: Fix deferred
Red Hat Satellite 6AffectedNo fix yet: Fix deferred
Red Hat build of Apicurio Registry 2AffectedNo fix yet: Fix deferred
Self-service automation portal 2AffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-31808
  2. 2026-10-03 Alias added: GHSA-5v7r-6r5c-r473
  3. 2026-10-27 Affected versions changed · Red Hat

References

  • TI-2026-25139 file-type affected by ZIP Decompression Bomb DoS via [Content_Types].xml entry CVSS 3.1MEDIUM 5.3
  • TI-2022-16660 An issue was discovered in the file-type package before 16.5.4 and 17.x before 17.1.3 for… CVSS 3.1MEDIUM 5.5

Sources