{"schemaVersion":3,"id":"CVE-2026-31808","aliases":["GHSA-5v7r-6r5c-r473","CGA-5mh6-c8hv-mw52","CGA-cm3j-54fp-59fv","CGA-f98f-86mw-mg33","CGA-gj9j-x9r2-745p","CGA-j83r-jg3j-mhhg","CGA-m28c-qf5j-3gp4","CGA-mmq4-rh73-pxg6","CGA-vpgg-rm6g-9vr7"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2026-03-10T21:01:55.466Z","modified":"2026-03-11T16:00:14.754Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.3,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":10,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":10,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00434,"percentile":0.36618,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0.10900000000000003,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00325},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00434,"percentile":0.36618}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00325,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00418,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00434,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00434,"percentile":0.36618}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition ('Infinite Loop')","description":"The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/835.html"}],"affected":[{"vendor":"chainguard","product":"foxx-cli","name":"foxx-cli","label":"foxx-cli","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/foxx-cli","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"librechat","name":"librechat","label":"librechat","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/librechat","purlType":"apk","versions":[{"text":"< 0.8.4-r3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.8.4-r3","eol":null,"hubHref":null},{"vendor":"chainguard","product":"redisinsight","name":"redisinsight","label":"redisinsight","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/redisinsight","purlType":"apk","versions":[{"text":"< 3.2.0-r2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.2.0-r2","eol":null,"hubHref":null},{"vendor":"Npm","product":"file-type","name":"file-type","label":"file-type","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/file-type","purlType":"npm","versions":[{"text":"≥ 13.0.0, < 21.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 13.0.0, < 21.3.1","eol":null,"hubHref":null},{"vendor":"sindresorhus","product":"file-type","name":"file-type","label":"file-type","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 13.0.0, < 21.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 13.0.0, < 21.3.1","eol":null,"hubHref":"/vendor/sindresorhus/file-type"}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/sindresorhus/file-type/security/advisories/GHSA-5v7r-6r5c-r473","label":"github.com/sindresorhus/file-type/security/advisories/GHSA-5v7r-6r5c-r473","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","Mitigation","Patch","Vendor Advisory"]},{"url":"https://github.com/sindresorhus/file-type/commit/319abf871b50ba2fa221b4a7050059f1ae096f4f","label":"github.com/sindresorhus/file-type/commit/319abf871b50ba2fa221b4a7050059f1ae096f4f","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","Patch"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31808","label":"nvd.nist.gov/vuln/detail/CVE-2026-31808","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/sindresorhus/file-type","label":"github.com/sindresorhus/file-type","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31808.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31808.json","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-C296-FW8M-W8P5"]},"timeline":[{"kind":"published","date":"2026-03-10T21:01:55.466Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-03-11T16:00:14.754Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":21,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-22T00:38:52.912Z","stale":false,"partial":false}}