Security mailing lists by PureSourceCode

CVE-2026-140010

HIGH 8.7CVSS 4.0

HTML Minifier Next: Regular expressions in `minify()` cause O(n²) backtracking on ignored and custom-fragment content

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.

Published
30 Nov 2026
Last modified
1 Dec 2026
Assigned by
security-advisories@github.com
NVD status
Received
Weakness
CWE-1333
Also known as
GHSA-9wmg-23wv-h297
Sources
NVDJSONCVE ListJSONOSV GHSA-9wmg-23wv-h297JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 4.0 HIGH 8.7 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
CVE List GitHub_M CVSS 4.0 HIGH 8.7 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
OSV GitHub CVSS 4.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
CVE List CISA-ADP SSVC Exploitation: poc; Automatable: yes; Technical Impact: partial

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
CVE List j9t html-minifier-next = < 9.1.2
CVE List j9t html-minifier = >= 3.1.1, < 5.0.1
OSV npm html-minifier-next < 9.1.2 9.1.2
OSV npm html-minifier >= 3.1.1, < 5.0.1 5.0.1

References

History

  • 1 Dec 2026 18:39 UTC · OSV: first stored (published 1 Dec 2026)
  • 1 Dec 2026 14:27 UTC · NVD: 1 reference added
  • 1 Dec 2026 14:04 UTC · CVE List: updated (other details)
  • 30 Nov 2026 22:30 UTC · NVD: first stored (published 30 Nov 2026)
  • 30 Nov 2026 21:58 UTC · CVE List: first stored (published 30 Nov 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.