Skip to main content

node-re2 EUVDEUVD-2026-51298

| CVE-2026-68499 MEDIUM
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-07-30 GitHub_M GHSA-6hxr-mr5r-9836
6.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify service endpoint passing user input to RE2 global match
  2. Delivery
    Supply subject string against empty-string-capable global pattern
  3. Exploit
    RE2 executes match with zero-width result
  4. Execution
    match.cc cursor fails to advance
  5. Persist
    Native loop spins consuming heap indefinitely
  6. Impact
    Node.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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

node-re2 < 1.25.2

Affected Packages

npm re2 fix: 1.25.2
euvd node_re2 fix: 1.25.2

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

Vendor (GitHub_M) PRIMARY 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Typical deployment exposes RE2 global match to network-supplied strings unauthenticated; zero-width trigger requires no privileges, only control over the subject string.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 6.2 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

1
Patch available
Jul 30, 2026 - 21:04 EUVD

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 40 npm packages depend on re2 (4 direct, 37 indirect)

Ecosystem-wide dependent count for version 1.25.2.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular npm package for ReDoS-safe regex in Node.js services
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

51
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy