CVE-2026-77299
Regexp2: Unbounded memory amplification via large `{m}` quantifier on a zero-width subexpression
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
Regexp2: Unbounded memory amplification via large `{m}` quantifier on a zero-width subexpression
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.
- Record
CVE-2026-77299- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-06
EUVDEUVD-2026-117884
7.5
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.
- Record
EUVD-2026-117884- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-06
NVD
7.5
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.
- Record
CVE-2026-77299- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-06
OSV
7.5
Regexp2: Unbounded memory amplification via large `{m}` quantifier on a zero-width subexpression
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.
- Record
CVE-2026-77299- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-07
OSVDEBIAN-CVE-2026-77299
7.5
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.
- Record
DEBIAN-CVE-2026-77299- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-07
OSVUBUNTU-CVE-2026-77299
7.5
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.
- Record
UBUNTU-CVE-2026-77299- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-07
OSVAZL-112697 No score
CVE-2026-77299 affecting package regexp 1.5-24
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.
- Record
AZL-112697- Updated
- 2026-11-06
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
regexpAzure Linux:3 |
through 1.5-24 | None known |
golang-github-dlclark-regexp2Debian:12 |
All versions, plus listed versions 1.10.0+ds1-11.10.0+ds1-1~bpo12+11.11.0+ds1-11.4.0+ds1-1 |
None known |
golang-github-dlclark-regexp2Debian:13 |
All versions, plus listed versions 1.11.0+ds1-1 |
None known |
golang-github-dlclark-regexp2Debian:14 |
All versions, plus listed versions 1.11.0+ds1-1 |
None known |
golang-github-dlclark-regexp2Ubuntu:18.04:LTS |
All versions, plus listed versions 1.1.6-1 |
None known |
golang-github-dlclark-regexp2Ubuntu:20.04:LTS |
All versions, plus listed versions 1.1.6-21.2.0-1 |
None known |
golang-github-dlclark-regexp2Ubuntu:22.04:LTS |
All versions, plus listed versions 1.2.0-11.4.0+ds1-1 |
None known |
golang-github-dlclark-regexp2Ubuntu:24.04:LTS |
All versions, plus listed versions 1.4.0+ds1-11.10.0+ds1-1 |
None known |
golang-github-dlclark-regexp2Ubuntu:26.10 |
All versions, plus listed versions 1.11.0+ds1-1 |
None known |
golang-github-dlclark-regexp2Ubuntu:26.04:LTS |
All versions, plus listed versions 1.11.0+ds1-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, published, references | EUVD, NVD, OSV | |
| references | CVE List | |
| affected, aliases, references | OSV | |
| affected, aliases, references | OSV | |
| aliases, references | NVD, OSV | |
| cwes, references, severity, title | CVE List | |
| first indexed | EUVD |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-77299 is a high vulnerability (CVSS 7.5) in Dlclark Regexp2, published November 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.35%, the 28th percentile. No source names a fixed version.
References
github.com/dlclark/regexp2/security/advisories/GHSA-wq9v-j77v-qr26
github.com/dlclark/regexp2/commit/6e446cb3a57a0f20112bc24353604fd00bdb309a
github.com/dlclark/regexp2/releases/tag/v2.3.0
nvd.nist.gov/vuln/detail/CVE-2026-77299
github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77299.json
security-tracker.debian.org/tracker/CVE-2026-77299
ubuntu.com/security/CVE-2026-77299
cve.org/CVERecord?id=CVE-2026-77299