Vulnerability in re2 (CVE-2026-68499)
Summary
Vulnerability in re2 (CVE-2026-68499). Risk of unauthorized operations or information disclosure. Exploitable via String.prototype.match. Mitigation: upgrade to 1.25.2 or later.
Original description
The description as published by the source.
Summary
String.prototype.match with a global RE2 collects all matches in a native loop that advances the cursor by the match length. A zero-width (empty) match has length 0, so the cursor never advances: the same empty match is found forever and appended to an ever-growing native vector. Any pattern that can match the empty string (a*, b?, x{0,3}, (a)|, (?:), …) therefore causes an infinite loop with unbounded memory growth. The call is synchronous native code, so it blocks the entire event loop and cannot be interrupted by try/catch, AbortController, --max-old-space-size, or timers — the process must be killed externally. This diverges from the built-in engine, where 'xxxx'.match(/a*/g) returns a finite array.
Root cause
// lib/match.cc:44 — global branch of WrappedRE2::Match
while (re2->regexp.Match(str, byteIndex, str.size, anchor, &match, 1)) {
groups.push_back(match);
byteIndex = match.data() - str.data + match.size(); // += 0 for a zero-width match
}
When match.size() == 0, byteIndex is unchanged, so the next iteration matches the same empty position again; groups grows without bound. The other iteration paths already guard this: lib/split.cc:50-55 advances by getUtf8CharSize on an empty match, and exec advances lastIndex. Only this global Match loop is missing the guard.
Proof of concept
const RE2 = require('re2');
'x'.match(new RE2('a*', 'g')); // never returns; grows memory unti…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-68499 has been found in re2.
Attackers can target a specific entry point like String.prototype.match over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.2/10.
What to do: upgrade re2 to 1.25.2 or later.
If unsure, ask your IT team or search "re2 CVE-2026-68499" on the vendor's site.
CVE-2026-68499 (re2) — CWE-835 / CVSS v3 6.2
Attack vector: local / unauthenticated / no user interaction
Attack surface: String.prototype.match / RE2 / AbortController / byteIndex
Patched: 1.25.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-835) exists in re2. Attackers reach the vulnerable code path via String.prototype.match without authentication.
Check the vendor advisory for the affected versions of re2. Attack surface: String.prototype.match / RE2 / AbortController / byteIndex.
Severity: Medium (CVSS 6.2/10). Risk of unauthorized operations or information disclosure.
Update to 1.25.2.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 're2' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 're2' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
re2を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade re2 to 1.25.2ステージング環境で 1.25.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-68499 node-re2
- Ubuntu UBUNTU-CVE-2026-68499 node-re2
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com