Skip to main content

node-re2 CVE-2026-67550

| EUVDEUVD-2026-51297 MEDIUM
Out-of-bounds Read (CWE-125)
2026-07-30 GitHub_M GHSA-ff84-5f28-78qj
5.7
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Submit non-ASCII string as regex subject
  2. Delivery
    Trigger lastIndex validation against UTF-8 byte length
  3. Exploit
    lastIndex passes guard but exceeds UTF-16 buffer bound
  4. Execution
    Out-of-bounds heap read in C++ addon
  5. Impact
    Uncatchable process crash terminates Node.js server

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

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: (1) the application must use node-re2 with a sticky ('y') or global ('g') flag, as only these modes consult and advance lastIndex; (2) the subject string passed to exec, test, match, replace, or split must contain at least one non-ASCII character, so that the UTF-8 byte length exceeds the UTF-16 unit count, creating the exploitable numeric gap; and (3) lastIndex must be set to a value strictly greater than the UTF-16 unit count but less than or equal to the UTF-8 byte count of the subject - this can occur via direct assignment from attacker-controlled input, or naturally through engine iteration over a sufficiently crafted non-ASCII string. What limits exploitation: applications that use RE2 exclusively with non-sticky, non-global patterns (no 'g' or 'y' flag) are not affected. Pure ASCII subjects are not affected because their UTF-8 and UTF-16 lengths are identical. Applications that never expose lastIndex advancement to external input and use only internal, trusted strings are not reachable from this vector.

Impact

The CVSS 3.1 vector (AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H, score 5.7) reflects the reporter's assessment of a local, high-complexity attack path. However, this rating warrants scrutiny: node-re2 is almost exclusively deployed in server-side Node.js applications that process external string input, and if user-supplied non-ASCII content flows into a global or sticky RE2 regex whose lastIndex is naturally advanced by the engine across iterations, the vulnerable state can be reached purely from network input - suggesting AV:N may be more accurate for typical deployments. High attack complexity (AC:H) is justified by the requirement that lastIndex must fall in the specific numeric gap between UTF-16 length and UTF-8 byte length of the subject. Impact is asymmetric: Availability is High because the crash is uncatchable and terminates the entire Node.js process (not just a request handler), whereas Confidentiality is Low (limited heap content may be disclosed in some runtime configurations). No CISA KEV listing and no known public exploit code reduce urgency, but the uncatchable crash characteristic elevates the effective DoS risk for any long-lived server process. EPSS data was not provided in the input and cannot be stated.

Exploit ScenarioDerived

An attacker submits a crafted HTTP request to a Node.js web service that passes user input as the subject string to a global or sticky RE2 regex (e.g., an input validation or search endpoint). By including non-ASCII characters (such as accented Latin or Cyrillic characters), the attacker causes the engine to set lastIndex to a value in the gap between the UTF-16 unit count and the UTF-8 byte count of the string. On the next exec or match call, node-re2 reads past the heap buffer, crashing the entire Node.js process with an uncatchable error and potentially leaking adjacent heap bytes in the process exit state.

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

Out-of-bounds heap read in node-re2 prior to 1.25.2 allows process termination and limited heap memory disclosure when an attacker-influenced lastIndex value is used against a non-ASCII subject string. The flaw arises because lastIndex is validated against the UTF-8 byte length of the input but consumed as a UTF-16 code-unit offset - for any non-ASCII character, the UTF-8 byte count exceeds the UTF-16 unit count, creating a gap where a lastIndex passes the guard yet reads past the allocated buffer. The resulting crash is uncatchable by the Node.js process, making it an effective denial-of-service vector in any server application exposing this code path to external input. No active exploitation confirmed (not in CISA KEV); no public exploit code identified at time of analysis.

RemediationAI

Upgrade node-re2 to version 1.25.2 or later; this is the vendor-released patch confirming the fix (https://github.com/uhop/node-re2/releases/tag/1.25.2). The underlying code change is in the C++ addon layer and cannot be patched at the JavaScript application level without recompiling the native module. If an immediate upgrade is not possible, the most effective compensating control is to sanitize or reject non-ASCII input before passing it to any RE2 method when using sticky ('y') or global ('g') flags - this eliminates the UTF-16/UTF-8 length discrepancy that creates the exploitable gap. Alternatively, avoid explicitly setting lastIndex on RE2 objects from external data and avoid iterating RE2 global/sticky regexes over user-supplied strings until the patch is applied. Note that input sanitization adds latency and may alter application semantics for internationalized content. The fix commit is at https://github.com/uhop/node-re2/commit/56293de4fc0914d7bc35f92e98de25b0d9bb417d.

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++ regex engine for use in Node.js via V8/NAN bindings. V8 stores JavaScript strings internally as UTF-16; RE2 operates on UTF-8 bytes. The addon layer must translate between these representations, tracking code-unit offsets for the sticky/global lastIndex property. The root cause (CWE-125: Out-of-bounds Read) is in prepareArgument() in addon.cc: the pre-patch code computed argLength via utf8Length(), which walks UTF-8 bytes (O(n)), and used that count to bound lastIndex. For a string like 'éé' (2 UTF-16 units, 4 UTF-8 bytes), a lastIndex of 3 passes the byte-length guard but is out of range for the UTF-16 buffer. The fix (commit 56293de) redefines argLength as s->Length() - the O(1) UTF-16 unit count - ensuring the guard is always consistent with the offset domain actually used. The getUtf16PositionByCounter helper also received a size parameter and a from > size clamp to prevent the walker from running off the end independently.

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 5.7 MEDIUM
AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
vuln.today AI 6.5 MEDIUM

Network vector reflects typical server-side Node.js deployment; high complexity captures the UTF-16/UTF-8 gap condition; no privileges needed for a public endpoint.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
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 validates lastIndex against the UTF-8 byte length of a subject but uses it as a UTF-16 code-unit offset in exec, test, match, replace, and split, allowing an attacker-influenced lastIndex on a non-ASCII subject to trigger an out-of-bounds heap read and an uncatchable process crash, with limited heap information disclosure in some cases. 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 98% exploitable
Prevalence
Medium
popular Node.js library for ReDoS-safe regex in server apps
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 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

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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