Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify service endpoint passing user input to RE2 global match
-
DeliverySupply subject string against empty-string-capable global pattern
-
ExploitRE2 executes match with zero-width result
-
Executionmatch.cc cursor fails to advance
-
PersistNative loop spins consuming heap indefinitely
-
ImpactNode.js event loop blocked, service fully unresponsive
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concurrent conditions: the application must call String.prototype.match (or an equivalent RE2 global iteration path through match.cc) with a RE2 pattern object compiled with the global flag (g); the pattern must be capable of producing a zero-width match - examples confirmed by vendor test cases include a*, b?, x{0,3}, (?:), (a)|, and any alternation containing an empty branch; and the attacker must be able to influence the subject string passed to that call. If the attacker also controls the pattern, any global pattern meeting the above criterion qualifies. No authentication is required at the RE2 library level (CVSS PR:N); whether the application enforces authentication before the vulnerable call site is application-specific. The vulnerability is strictly limited to denial of service - no confidentiality or integrity impact is possible. Applications using RE2 exclusively with non-global patterns, or patterns provably incapable of matching the empty string, are not affected by this specific flaw. |
| Impact | The vendor-assigned CVSS vector is AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (6.2), reflecting the library layer's local attack surface. However, node-re2 is predominantly deployed inside Node.js web services that forward externally supplied strings into RE2 patterns; in that model the effective attack vector is network-accessible without authentication, warranting a practical risk closer to AV:N (CVSS ~7.5). No EPSS data was supplied in the available intelligence, and no CISA KEV listing exists, so confirmed mass exploitation cannot be asserted. The DoS trigger is low-complexity: any global RE2 pattern capable of matching an empty string (e.g., a*, b?, x{0,3}, (?:), or an alternation with an empty branch) applied to attacker-controlled input is sufficient - no special crafting of the subject string is required. The absence of a memory growth cap amplifies impact beyond a CPU spin; sustained requests can exhaust host RAM and cause OOM termination rather than a simple timeout. EPSS score and active-exploitation signals are absent from provided data - these are explicit gaps in the current intelligence picture. |
| Exploit ScenarioDerived | An attacker submits an HTTP request to a Node.js API endpoint that passes a request field - such as a search term or filter expression - as the subject string to a RE2 global match against a server-side pattern like a* or (?:). The zero-width match condition triggers immediately on the first non-matching character, stalling the RE2 cursor and spinning the native loop indefinitely; the Node.js event loop is occupied, all subsequent inbound requests queue and time out, and native heap grows without bound until the process is OOM-killed or an operator intervenes. No public proof-of-concept exploit code has been identified, but the trigger is directly reproducible from the test cases added by the vendor in the 1.25.2 fix commit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 30, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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).
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
1DescriptionCVE.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.
Blast Radius
ecosystem impact- 40 npm packages depend on re2 (4 direct, 37 indirect)
Ecosystem-wide dependent count for version 1.25.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
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
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-51298
GHSA-6hxr-mr5r-9836
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB