Skip to content
High 8.7

html-minifier-nextに正規表現の処理が重くなる脆弱性 CPUを長時間占有されるおそれ

CVE-2026-140010 First seen on SecPulse

Summary

html-minifier-nextとhtml-minifierの一部の版に、minify()の正規表現の処理に問題があり、細工された入力でCPUを数秒から数分占有されるおそれがあります。深刻度はhighで、CVSS v4.0のスコアは8.7です。html-minifier-next 9.1.2以降、html-minifier 5.0.1以降で修正されているため、該当する版を使っている場合は修正版へ更新してください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

html-minifier-nextとhtml-minifierの一部の版に、minify()の正規表現の処理に問題があり、細工された入力でCPUを数秒から数分占有されるおそれがあります。深刻度はhighで、CVSS v4.0のスコアは8.7です。html-minifier-next 9.1.2以降、html-minifier 5.0.1以降で修正されているため、該当する版を使っている場合は修正版へ更新してください。

Affected packages

PackageAffected → Fixed
j9thtml-minifier-next —
j9thtml-minifier —
npmhtml-minifier-next
< 9.1.2→ 9.1.2
npmhtml-minifier
≥ 3.1.1, < 5.0.1→ 5.0.1
Original description The description as published by the source.

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.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details