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.

Project Subscriptions

Vendors Products
Dlclark Subscribe
Regexp2 Subscribe
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Sat, 07 Nov 2026 07:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 06 Nov 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Dlclark
Dlclark regexp2
Vendors & Products Dlclark
Dlclark regexp2

Fri, 06 Nov 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Fri, 06 Nov 2026 01:45:00 +0000

Type Values Removed Values Added
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.
Title Regexp2: Unbounded memory amplification via large `{m}` quantifier on a zero-width subexpression
Weaknesses CWE-400
CWE-770
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-11-06T17:43:52.421Z

Reserved: 2026-08-20T19:17:14.375Z

Link: CVE-2026-77299

cve-icon Vulnrichment

Updated: 2026-11-06T17:43:43.462Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-11-06T02:17:52.893

Modified: 2026-11-12T22:18:35.610

Link: CVE-2026-77299

cve-icon Redhat

Severity : Important

Publid Date: 2026-11-06T01:28:58Z

Links: CVE-2026-77299 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-11-06T16:34:37Z

Weaknesses