CVE-2026-140010

8.7High

Published Nov 30, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite

8.7CVSS

High

0CVSS v4.010

Attack vector
Network
Complexity
Low
Privileges
None
User action
None
Impact
High impact on availability
Weakness
CWE-1333

What an attacker gets

Unauthenticated attackers can trigger a denial-of-service by causing high CPU usage. They only need to send a specially crafted HTML payload to an application using the vulnerable minifier.

Root cause

The minify() function uses inefficient regular expressions that are susceptible to catastrophic backtracking when processing specific long HTML fragments.

Affected versions

  • html-minifier-next prior to 9.1.2
  • html-minifier 3.1.1 through 5.0.0

CVSS v4.0 · 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:X/V:X/RE:X/U:X

Fix & remediation

Upgrade to html-minifier-next 9.1.2 or html-minifier 5.0.1. If you cannot update immediately, disable the collapseWhitespace option in your minifier configuration.

remediation — bash
$ npm install html-minifier-next@latest

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD description

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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-140010

More fully triaged vulnerabilities you may want to check next.