Regexp2に大量のメモリを消費させられる脆弱性、2.3.0で修正
概要
Regexp2の2.3.0より前のバージョンには、空の部分パターンに大きな繰り返し回数を指定すると、メモリを際限なく消費してプロセスが強制終了されるおそれのある脆弱性があります。短い正規表現と空の入力だけで発生するため、この条件に当てはまる利用環境では急いで対応する必要があります。修正版の2.3.0で対処されているため、2.3.0以降へ更新してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
Regexp2の2.3.0より前のバージョンには、空の部分パターンに大きな繰り返し回数を指定すると、メモリを際限なく消費してプロセスが強制終了されるおそれのある脆弱性があります。短い正規表現と空の入力だけで発生するため、この条件に当てはまる利用環境では急いで対応する必要があります。修正版の2.3.0で対処されているため、2.3.0以降へ更新してください。
ディストリビューション別の修正状況
各ディストリビューションが公開している、この CVE の記録です。修正版は配布版ごとに違うので、リンク先で確かめてください。
- Debian DEBIAN-CVE-2026-77299 golang-github-dlclark-regexp2 修正版あり
- Ubuntu UBUNTU-CVE-2026-77299 golang-github-dlclark-regexp2 この記録に修正版の記載なし
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Regexp2 is a feature-rich RegExp engine for Go. Prior to version 2.3.0, when regexp2 compiles and matches a pattern containing a large fixed-count quantifier applied to a zero-width subexpression — e.g. (?:){50000000} — the match engine executes the empty loop body m-1 times, pushing two integers onto the backtracking stack on every iteration. Because the parser accepts any repetition count up to math.MaxInt32 and the backtracking stack grows without bound, a pattern of fewer than 20 bytes matched against an empty input can force multi-gigabyte allocation and OOM-kill the process. MatchTimeout does not fully mitigate this because the memory is allocated faster than the 100 ms timeout clock can fire. This issue has been patched in version 2.3.0.
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- patch github.com
- REDHAT Red Hat
- web github.com