
Cloud Vulnerability DB
コミュニティ主導の脆弱性データベース
CVE-2026-140010 is a Regular Expression Denial of Service (ReDoS) vulnerability in the minify() function of HTML Minifier Next and its predecessor HTML Minifier. The flaw stems from ambiguous regular expressions (RE_LAST_HTML_TAG and a whitespace-splitting variant) that cause quadratic backtracking when processing attacker-controlled HTML content. Affected versions include html-minifier-next prior to 9.1.2 and html-minifier from 3.1.1 up to (but not including) 5.0.1. It was published on November 30, 2026, and carries a CVSS v4.0 base score of 8.7 (High) (GitHub Advisory).
The root cause is classified as CWE-1333 (Inefficient Regular Expression Complexity), mapped to CAPEC-492 (Regular Expression Exponential Blowup). Two problematic expressions exist in src/htmlminifier.js: RE_LAST_HTML_TAG = /[\s\S]*<(\/?[a-zA-Z][\w:-]*)/ (line 691) and /^(\s*)[\s\S]?(\s)$/ (line 1279). The greedy [\s\S]* prefix followed by a required literal < forces the regex engine to retry at every character boundary when no < is present, producing O(n²) work. The RE_LAST_HTML_TAG variant is triggered when collapseWhitespace is enabled and a large htmlmin:ignore block (with no matching closing tag) is followed by a real HTML element; the whitespace-splitting variant is triggered independently by a long whitespace run inside a default ignoreCustomFragments match. User-controlled HTML content flows directly into these regex evaluations with no length pre-check (GitHub Advisory, Fix Commit).
Successful exploitation causes severe CPU exhaustion on the server running the minifier: a 256 KB malicious payload can block a Node.js process for approximately 89 seconds, with complexity scaling quadratically (128 KB ≈ 16.5 s, 64 KB ≈ 1.5 s). In web service or API contexts, a small number of concurrent malicious requests can exhaust the event loop and CPU, rendering the service unavailable. The attack surface is broad — any application that passes untrusted HTML to minify() with collapseWhitespace enabled is affected, including CMS platforms, comment systems, email template renderers, online HTML optimization tools, and CI/CD build pipelines. There is no confidentiality or integrity impact; the sole consequence is availability loss (GitHub Advisory).
No public proof-of-concept exploit code has been observed, and there is no evidence of in-the-wild exploitation at the time of disclosure. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. However, the attack requires no authentication, no special privileges, and no user interaction — an attacker only needs the ability to submit HTML content that is subsequently processed by the minifier. The advisory itself includes a detailed PoC script (e2e_htmlmin2.mjs) demonstrating the quadratic timing behavior, lowering the barrier for exploitation (GitHub Advisory).
html-minifier-next (< 9.1.2) or html-minifier (3.1.1–5.0.0) with collapseWhitespace: true enabled.htmlmin:ignore block filled with characters that contain no <, followed by a real HTML element. Example structure: <htmlmin:ignore> + 'a'.repeat(256000) + </htmlmin:ignore> + <b>y</b>.ignoreCustomFragments match (e.g., inside a <!-- ... --> or <% ... %> block) to trigger the /^(\s*)[\s\S]?(\s)$/ expression.minify() call enters quadratic backtracking, occupying a CPU core for seconds to minutes per request. Sending a small number of concurrent requests exhausts server CPU, causing service unavailability (GitHub Advisory).minify(); event loop lag alerts in Node.js APM tools.htmlmin:ignore blocks or payloads with long whitespace runs in comment or template tag fragments.html-minifier-next versions ≤ 9.1.1 or html-minifier versions 3.1.1–5.0.0 in node_modules/ (check package-lock.json or npm list html-minifier-next html-minifier).The primary remediation is to upgrade to html-minifier-next version 9.1.2 or later, or html-minifier version 5.0.1 or later, which replace the ambiguous regular expressions with linear-time equivalents (Fix Commit). If immediate patching is not possible, the following workarounds can reduce risk: disable the collapseWhitespace option to prevent the RE_LAST_HTML_TAG code path from being reached; implement input validation to reject or truncate HTML inputs exceeding a safe length threshold before passing them to minify(); and enforce per-request CPU time limits or timeouts on the minification process. Running the minifier in a worker thread with a timeout can also limit the blast radius of a successful attack (GitHub Advisory).
ソース: この報告書はAIを用いて作成されました
無料脆弱性評価
9つのセキュリティ領域にわたるクラウドセキュリティの実践を評価し、リスクレベルをベンチマークし、防御のギャップを特定しましょう。
パーソナライズされたデモを見る
"私が今まで見た中で最高のユーザーエクスペリエンスは、クラウドワークロードを完全に可視化します。"
"Wiz を使えば、クラウド環境で何が起こっているかを 1 つの画面で確認することができます"
"Wizが何かを重要視した場合、それは実際に重要であることを私たちは知っています。"