CVE-2026-31808
MEDIUM
CVSS 5.3
No EPSS data
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 details
EPSS
This CVE is not currently listed in the EPSS dataset.
Show JSON
{
"cve": {
"id": "CVE-2026-31808",
"cveTags": [],
"metrics": {
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "LOW",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
},
"impactScore": 1.4,
"exploitabilityScore": 3.9
}
]
},
"published": "2026-03-10T21:16:50.173",
"references": [
{
"url": "https://github.com/sindresorhus/file-type/commit/319abf871b50ba2fa221b4a7050059f1ae096f4f",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/sindresorhus/file-type/security/advisories/GHSA-5v7r-6r5c-r473",
"tags": [
"Mitigation",
"Patch",
"Vendor Advisory"
],
"source": "security-advisories@github.com"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Primary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-835"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "file-type detecta el tipo de archivo de un archivo, flujo o datos. Antes de 21.3.1, existe una vulnerabilidad de denegaci\u00f3n de servicio en el analizador de detecci\u00f3n de tipo de archivo ASF (WMV/WMA). Al analizar una entrada manipulada donde un subencabezado ASF tiene un campo de tama\u00f1o de cero, el analizador entra en un bucle infinito. El valor de la carga \u00fatil se vuelve negativo (-24), haciendo que tokenizer.ignore(payload) mueva la posici\u00f3n de lectura hacia atr\u00e1s, por lo que el mismo subencabezado se lee repetidamente para siempre. Cualquier aplicaci\u00f3n que utiliza file-type para detectar el tipo de entrada no confiable/controlada por el atacante se ve afectada. Un atacante puede paralizar el bucle de eventos de Node.js con una carga \u00fatil de 55 bytes. Corregido en la versi\u00f3n 21.3.1."
}
],
"lastModified": "2026-03-18T19:48:13.733",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:sindresorhus:file-type:*:*:*:*:*:node.js:*:*",
"vulnerable": true,
"matchCriteriaId": "6A5F1C18-775C-4C3E-B4D7-332961814056",
"versionEndExcluding": "21.3.1",
"versionStartIncluding": "13.0.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}
}