CVE-2026-140010 — Html-minifier-next — CWE-1333
## Summary html-minifier-next finds the last HTML tag inside htmlmin:ignore blocks with the expression /[\s\S]*<(\/?[a-zA-Z][\w:-]*)/. A large ignore block without a matching tag makes the greedy prefix rescan the content, so the public minify() API takes about 89 seconds for 256 KB. A second expression with the same flaw, `/^(\s*)[\s\S]?(\s)$/`, splits whitespace off matches of `ignoreCustomFragments`. A long whitespace run inside such a fragment triggers it with default options, since the default fragments cover `<? … ?>` and `<% … %>` (64 KB: about 3.3 s). ## Affected component and version - Repository: `j9t/html-minifier-next` - Affected version(s): Affected version(s): all releases up to and including 9.1.1 - Component: src/htmlminifier.js:691 (`RE_LAST_HTML_TAG`), :1795 (exec on `htmlmin:ignore` content, requires `collapseWhitespace`); src/htmlminifier.js:1279 (whitespace split of `ignoreCustomFragments` matches, default options) - Status: the vulnerable expression is present at the referenced revision; no fix was identified at the time of reporting. html-minifier is affected as well: The custom-fragment issue dates back to html-minifier 3.1.1, and 5.0.0, rebuilt on HTML Minifier Next 9.1.1, carries both. ## Reproduction input minify() on a document containing a large htmlmin:ignore block whose content is plain text with no '<tag' terminator (N=256000 characters). ## Measured timings The following values were measured against the real code path described ab
## Summary html-minifier-next finds the last HTML tag inside htmlmin:ignore blocks with the expression /[\s\S]*<(\/?[a-zA-Z][\w:-]*)/. A large ignore block without a matching tag makes the greedy prefix rescan the content, so the public minify() API takes about 89 seconds for 256 KB. A second expression with the same flaw, `/^(\s*)[\s\S]?(\s)$/`, splits whitespace off matches of `ignoreCustomFragments`. A long whitespace run inside such a fragment triggers it with default options, since the default fragments cover `<? … ?>` and `<% … %>` (64 KB: about 3.3 s). ## Affected component and version - Repository: `j9t/html-minifier-next` - Affected version(s): Affected version(s): all releases up to and including 9.1.1 - Component: src/htmlminifier.js:691 (`RE_LAST_HTML_TAG`), :1795 (exec on `htmlmin:ignore` content, requires `collapseWhitespace`); src/htmlminifier.js:1279 (whitespace split of `ignoreCustomFragments` matches, default options) - Status: the vulnerable expression is present at the referenced revision; no fix was identified at the time of reporting. html-minifier is affected as well: The custom-fragment issue dates back to html-minifier 3.1.1, and 5.0.0, rebuilt on HTML Minifier Next 9.1.1, carries both. ## Reproduction input minify() on a document containing a large htmlmin:ignore block whose content is plain text with no '<tag' terminator (N=256000 characters). ## Measured timings The following values were measured against the real code path described ab
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-140010
CVSS 8.7/10 · HIGH · 30.11.2026
CWE: CWE-1333
Vector: 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
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Summary: ## Summary
html-minifier-next finds the last HTML tag inside htmlmin:ignore blocks with the expression /[\s\S]<(\/?[a-zA-Z][\w:-])/. A large ignore block without a matching tag makes the greedy prefix rescan the content, so the public minify() API takes about 89 seconds for 256 KB. A second expression with the same flaw, /^(\s*)[\s\S]?(\s)$/, splits whitespace off matches of `ignoreCustomF…
Affected: html-minifier-next, html-minifier
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N) · low attack complexity (AC:L).
🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); service can be completely taken down.
🛡️ REMEDIATION
→ Apply vendor security update for html-minifier-next.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
⚠️ This week (7 days) — High risk, anonymous remote.
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]