CVE-2026-77299Regexp2: Unbounded memory amplification via large `{m}` quantifier on a zero-width…
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
Fixed builds are available from Debian: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | golang-github-dlclark-regexp2 | Fix pending | UBUNTU-CVE-2026-77299 | |
| Ubuntu 26.04 | golang-github-dlclark-regexp2 | Under investigation | UBUNTU-CVE-2026-77299 | |
| Ubuntu 24.04 | golang-github-dlclark-regexp2 | Under investigation | UBUNTU-CVE-2026-77299 | |
| Ubuntu 22.04 | golang-github-dlclark-regexp2 | Under investigation | UBUNTU-CVE-2026-77299 | |
| Ubuntu 20.04 | golang-github-dlclark-regexp2 | Fix pending | UBUNTU-CVE-2026-77299 | |
| Ubuntu 18.04 | golang-github-dlclark-regexp2 | Fix pending | UBUNTU-CVE-2026-77299 | |
| Debian 14 | golang-github-dlclark-regexp2 | Fixed | 1.11.0+ds1-2 | DEBIAN-CVE-2026-77299 |
| Debian 13 | golang-github-dlclark-regexp2 | Fix pending | DEBIAN-CVE-2026-77299 | |
| Debian 12 | golang-github-dlclark-regexp2 | Fix pending | DEBIAN-CVE-2026-77299 | |
| Red Hat Enterprise Linux 10 | grafana | Under investigation | ||
| Red Hat Enterprise Linux 10 | grafana-selinux | Under investigation | ||
| Red Hat Enterprise Linux 10 | gvisor-tap-vsock | Under investigation | ||
| Red Hat Enterprise Linux 10 | gvisor-tap-vsock-gvforwarder | Under investigation | ||
| Red Hat Enterprise Linux 9 | grafana | Under investigation | ||
| Red Hat Enterprise Linux 9 | grafana-selinux | Under investigation | ||
| Red Hat Enterprise Linux 9 | gvisor-tap-vsock | Under investigation | ||
| Red Hat Enterprise Linux 9 | gvisor-tap-vsock-gvforwarder | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Under investigation | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Under investigation |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- dlclark regexp2: affected: < 2.3.0
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.