{"cve":"CVE-2026-31808","nvd":{"published":"2026-03-10T21:16:50.173","modified":"2026-06-17T10:34:30.063","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3},"cwes":["CWE-835"],"references":["https://github.com/sindresorhus/file-type/commit/319abf871b50ba2fa221b4a7050059f1ae096f4f","https://github.com/sindresorhus/file-type/security/advisories/GHSA-5v7r-6r5c-r473"],"products":["sindresorhus:file-type"],"source":"nvd","synced_at":"2026-10-19T22:25:53.701907451+00:00"},"epss":{"cve":"CVE-2026-31808","score":0.00345,"percentile":0.28064,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-5v7r-6r5c-r473","url":"https://osv.dev/vulnerability/GHSA-5v7r-6r5c-r473","summary":"file-type affected by infinite loop in ASF parser on malformed input with zero-size sub-header","modified":"2026-09-10T03:50:37.674187908Z","packages":[{"ecosystem":"npm","name":"file-type","purl":"pkg:npm/file-type","ranges":[">=13.0.0 <21.3.1"],"fixed":["21.3.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}