- Accueil
- Vulnérabilités
- CVE-2026-140010
CVE-2026-140010
HTML Minifier Next: Regular expressions in `minify()` cause O(n²) backtracking on ignored and custom-fragment content
Résumé
HTML Minifier Next is a configurable HTML minifier and the enhanced successor to HTML Minifier. Prior to html-minifier-next 9.1.2, and from html-minifier 3.1.1 until 5.0.1, minify() in src/htmlminifier.js uses ambiguous regular expressions that can repeatedly rescan ignored or custom-fragment content. The ignoreCustomFragments whitespace-splitting variant dates to html-minifier 3.1.1, while html-minifier 5.0.0 carries both that variant and the RE_LAST_HTML_TAG variant used for htmlmin:ignore content. With collapseWhitespace enabled, a long htmlmin:ignore block without a matching tag reaches RE_LAST_HTML_TAG when the ignore-block placeholder and intervening text are followed by a real element; independently, a long whitespace run in a default custom fragment reaches the whitespace-splitting expression. Either form can cause quadratic regular-expression backtracking and occupy a CPU core for seconds or minutes. This issue is fixed in html-minifier-next 9.1.2 and html-minifier 5.0.1.
Aucune traduction française : description d’origine affichée.
Produits et versions affectés
j9t (2 ligne(s))
| Produit | Versions | Corrigé dans | Source |
|---|---|---|---|
| html-minifier | Versions non précisées | — | CNA (éditeur ou attributeur) |
| html-minifier-next | Versions non précisées | — | CNA (éditeur ou attributeur) |
npm (2 ligne(s))
| Produit | Versions | Corrigé dans | Source |
|---|---|---|---|
| html-minifier | de 3.1.1 (inclus) à 5.0.1 (exclu) |
5.0.1 |
GitHub Advisory |
| html-minifier-next | avant 9.1.2 (exclu) |
9.1.2 |
GitHub Advisory |
Correctif
Mise à jour — npm/html-minifier-next 9.1.2; npm/html-minifier 5.0.1source officielle
Source : GitHub Advisory
Contournement
Aucun contournement renseigné.
Savoir si vous êtes touché
Aucune méthode de vérification renseignée.
Chronologie
- — Publication de la CVE (cve)
Avis CERT-FR
- GHSA-9wmg-23wv-h297 — HTML Minifier Next: Regular expressions in `minify()` cause O(n²) backtracking on ignored and custom-fragment content 1 déc. 2026
Références
Provenance des données
- Statut
- NVD
- Date de publication
- NVD
- Description
- CNA (éditeur ou attributeur)
- Score CVSS
- CNA (éditeur ou attributeur)
- Faiblesse (CWE)
- NVD
- Vecteur CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:(CVSS 4.0, CNA:security-advisories@github.com)- Faiblesse
- CWE-1333 · Autre (CWE-1333)