file-type affected by infinite loop in ASF parser on malformed input with zero-size sub-header (sindresorhus file-type)
En bref
- Source
- NVD
- EPSS
- EPSS 0.34 % · centile 28 ()
- État
- PUBLISHED
- Publiée
- Mise à jour
- Attribuée par
- GitHub_M
- Statut NVD
- 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.
Faiblesses (CWE)
- CWE-835 — Boucle dont la condition de sortie est inatteignable (boucle infinie)
Références
Scores
| Version | Score | Vecteur | Évalué par |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | GitHub_M |
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | NVD · security-advisories@github.com (Secondary) |
Avis
- GHSA-5v7r-6r5c-r473 — file-type affected by infinite loop in ASF parser on malformed input with zero-size sub-header
Références européennes
- ENISA EUVD · EUVD-2026-10894
- GCVE · GCVE-0-2026-31808
Avis du CERT-FR
- CERTFR-2026-AVI-0667 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
Configurations affectées (CPE NVD)
cpe:2.3:a:sindresorhus:file-type:*:*:*:*:*:node.js:*:*≥ 13.0.0 < 21.3.1
Produits affectés
| Produit | Versions |
|---|---|
| sindresorhus · file-type | affected >= 13.0.0, < 21.3.1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |