Skip to content
OpenAdvisories
High · 7.5 CVE-2026-77299 EUVD-2026-117884

Regexp2: Unbounded memory amplification via large `{m}` quantifier on a zero-width subexpression

Published Nov 6, 2026 · Updated Nov 6, 2026 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
dlclark regexp2 < 2.3.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 golang-github-dlclark-regexp2 No fix yet —
Debian 13 golang-github-dlclark-regexp2 No fix yet —
Debian 12 golang-github-dlclark-regexp2 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 golang-github-dlclark-regexp2 No fix yet —
Ubuntu 26.04 LTS golang-github-dlclark-regexp2 No fix yet —
Ubuntu 24.04 LTS golang-github-dlclark-regexp2 No fix yet —
Ubuntu 22.04 LTS golang-github-dlclark-regexp2 No fix yet —
Ubuntu 20.04 LTS golang-github-dlclark-regexp2 No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS golang-github-dlclark-regexp2 No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 gh +2 No fix yet —

References