CVE-2026-140010
Published:November 30, 2026
Updated:December 01, 2026
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.
Affected Packages
html-minifier-next (NPM):
Affected version(s) >=1.0.0 <9.1.2Fix Suggestion:
Update to version 9.1.2html-minifier (NPM):
Affected version(s) =4.0.0 <5.0.1 || =5.0.0 <5.0.1 || >=3.1.1 <5.0.1Fix Suggestion:
Update to version 5.0.1html-minifier (NPM):
Affected version(s) >=3.1.1 <5.0.1Fix Suggestion:
Update to version 5.0.1html-minifier-next (NPM):
Affected version(s) >=3.0.0 <9.1.2 || >=1.0.0 <9.1.2 || >=2.0.0 <9.1.2 || >=4.0.2 <9.1.2 || >=5.0.0 <9.1.2 || >=6.0.0 <9.1.2 || >=8.0.0 <9.1.2 || >=7.0.0 <9.1.2 || >=9.0.0 <9.1.2Fix Suggestion:
Update to version 9.1.2Related ResourcesĀ (5)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Inefficient Regular Expression Complexity
EPSS
Base Score:
0.48