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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 45% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-06T01:28:58.685Z
- Modified: 2026-11-12T22:18:35.610Z
- Weaknesses: CWE-400, CWE-770
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- dlclark regexp2: < 2.3.0

## References

- <https://github.com/dlclark/regexp2/security/advisories/GHSA-wq9v-j77v-qr26> (exploit)
- <https://github.com/dlclark/regexp2/commit/6e446cb3a57a0f20112bc24353604fd00bdb309a>
- <https://github.com/dlclark/regexp2/releases/tag/v2.3.0>

## Sources

- CVE List: [CVE-2026-77299](https://www.cve.org/CVERecord?id=CVE-2026-77299), CVE Terms of Use, modified 2026-11-06
- NVD: [CVE-2026-77299](https://nvd.nist.gov/vuln/detail/CVE-2026-77299), Public domain, modified 2026-11-12

---

Page: https://cve.day/CVE-2026-77299 · Whole record: https://cve.day/CVE-2026-77299.json · Rebuilt by cve.day 2026-11-25T22:59:49.213Z
