Severity by source
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Typical deployment exposes RE2 global match to network-supplied strings unauthenticated; zero-width trigger requires no privileges, only control over the subject string.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3Blast Radius
ecosystem impact- 40 npm packages depend on re2 (4 direct, 37 indirect)
Ecosystem-wide dependent count for version 1.25.2.
DescriptionCVE.org
re2 provides Node.js bindings for Google's RE2 regular expression engine. Prior to 1.25.2, re2's String.prototype.match implementation with a global RE2 pattern that can match the empty string fails to advance its native matching cursor in lib/match.cc, causing an infinite loop and unbounded native memory growth that blocks the event loop and can exhaust host memory. This issue is fixed in 1.25.2.
AnalysisAI
node-re2, the Node.js native binding for Google's RE2 regular expression engine, enters an infinite loop and leaks unbounded native memory when String.prototype.match is called with a global pattern capable of producing zero-width (empty string) matches. All versions prior to 1.25.2 are affected; because RE2 executes synchronously within the Node.js event loop thread, the hang is unrecoverable without a process restart, making any service that exposes RE2 global matching to externally-supplied input susceptible to complete denial of service. No public exploit code or CISA KEV listing has been identified at time of analysis, but the trigger condition is mechanically trivial and directly exercisable from patterns confirmed in the vendor's own test additions.
Technical ContextAI
node-re2 (CPE: cpe:2.3:a:uhop:node-re2:*:*:*:*:*:*:*:*) wraps Google's RE2 C++ engine as a Node.js native addon, providing ReDoS-safe regular expressions with a JavaScript-compatible API. The vulnerability is classified as CWE-835 (Loop with Unreachable Exit Condition) and originates in lib/match.cc: the global match iterator advanced the byte-index cursor by match.size() after each match; for zero-width matches this value is zero, so the cursor never moves and the loop iterates forever, accumulating result entries and consuming unbound native heap. The committed fix (https://github.com/uhop/node-re2/commit/56293de4fc0914d7bc35f92e98de25b0d9bb417d) adds an explicit branch in match.cc - when match.size() equals zero, the cursor advances by one UTF-8 code-point width using getUtf8CharSize(), preventing the stall. The same commit co-fixes a related issue in addon.cc and wrapped_re2.h where lastIndex bounds-checking used the UTF-8 byte length rather than the UTF-16 code-unit length of the subject string, which could allow an out-of-range lastIndex to read past the buffer on non-ASCII inputs (referenced internally as GHSA-ff84-5f28-78qj).
RemediationAI
Upgrade node-re2 to version 1.25.2, the vendor-released patch available at https://github.com/uhop/node-re2/releases/tag/1.25.2 and on npm as re2@1.25.2. Because the fix resides in the native C++ addon rather than pure JavaScript, a full package reinstall (npm install re2@^1.25.2 followed by npm rebuild if necessary) is required to replace the compiled binary. If an immediate upgrade is blocked, two specific compensating controls are available: first, audit all call sites that invoke RE2 with the global flag and add a pre-flight check to reject patterns that can match the empty string (e.g., verify the pattern does not match '' before use), at the cost of rejecting some legitimate patterns; second, run RE2 global-match operations in a worker thread or child process with a hard timeout and forcible termination on expiry, at the cost of added per-request latency and process-management complexity. Do not substitute Node.js's built-in RegExp engine as a workaround if the original motivation for adopting RE2 was ReDoS safety, since the two engines have fundamentally different worst-case complexity guarantees.
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a
Same technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51298
GHSA-6hxr-mr5r-9836