Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit non-ASCII string as regex subject
-
DeliveryTrigger lastIndex validation against UTF-8 byte length
-
ExploitlastIndex passes guard but exceeds UTF-16 buffer bound
-
ExecutionOut-of-bounds heap read in C++ addon
-
ImpactUncatchable 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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++ 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
AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
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.
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 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- 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
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.
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-51297
GHSA-ff84-5f28-78qj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB