Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. re2
  4. ›
  5. CVE-2026-68499

CVE-2026-68499: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → infinite loop with unbounded native memory growth (DoS)

July 31, 2026

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.

References

  • github.com/advisories/GHSA-6hxr-mr5r-9836
  • github.com/uhop/node-re2/commit/56293de4fc0914d7bc35f92e98de25b0d9bb417d
  • github.com/uhop/node-re2/releases/tag/1.25.2
  • github.com/uhop/node-re2/security/advisories/GHSA-6hxr-mr5r-9836
  • nvd.nist.gov/vuln/detail/CVE-2026-68499

Code Behaviors & Features

Detect and mitigate CVE-2026-68499 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.25.2

Fixed versions

  • 1.25.2

Solution

Upgrade to version 1.25.2 or above.

Impact 6.2 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

npm/re2/CVE-2026-68499.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:54 +0000.