CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-71430

CVE-2026-71430: Denial of Service via Native Assertion Failure in node-re2 Replace Operation

Alon Barad
Alon Barad
Software Engineer

Aug 7, 2026·6 min read·23 visits

Executive Summary (TL;DR)

Vulnerable versions of node-re2 invoke .ToLocalChecked() on empty V8 handles when string allocations fail due to length limits, crashing the entire Node.js runtime process with SIGABRT.

A denial-of-service vulnerability in node-re2 prior to version 1.25.1 allows attackers to trigger uncatchable native assertion failures in the Google V8 engine. By supplying output-amplifying replacement templates, an attacker can exceed V8 string limits, resulting in an immediate process crash.

Vulnerability Overview

The Node.js native regular expression binding library, node-re2, wraps the Google RE2 regular expression engine to provide safe, linear-time regular expression matching. This wrapper relies on native C++ abstractions to bridge the boundary between the V8 JavaScript engine and the RE2 C++ library. The vulnerability designated as CVE-2026-71430 resides within the replacement functionality of this native addon, specifically when handling output-amplifying replacements.

The flaw is located in the WrappedRE2::Replace implementation within lib/replace.cc. It affects both String.prototype.replace(re2, template) and RE2.prototype.replace() calls. When processing regular expression replacements, the addon allocates memory buffers and V8 string structures to hold the modified output string. This process exposes an attack surface where input and replacement parameters directly influence native memory allocations.

Under normal execution, node-re2 provides immunity to Regular Expression Denial of Service (ReDoS) because of RE2's internal DFA/NFA execution limits. However, the wrapper code itself introduces a secondary denial-of-service vector. By failing to validate the status of V8 memory allocations, the wrapper permits an uncatchable native assertion failure, terminating the entire Node.js runtime process.

Root Cause Analysis

The root cause of CVE-2026-71430 lies in the unsafe unwrapping of v8::MaybeLocal handles returned by the Native Abstractions for Node.js (NAN) API during allocation failures. In C++ Node.js addons, operations that instantiate JavaScript types return a v8::MaybeLocal<T> wrapper, which signals potential allocation failure by returning an empty handle. This occurs when an allocation request exceeds the engine-level restrictions, such as v8::String::kMaxLength or system memory limits.

In vulnerable versions of node-re2, the developer immediately invoked .ToLocalChecked() on the MaybeLocal instances without verifying whether the handles were empty. The .ToLocalChecked() function is designed under a fail-fast paradigm. If the underlying V8 handle is empty, .ToLocalChecked() calls v8::Utils::ReportApiFailure, which executes an uncatchable native assertion crash via abort().

Because the failure is raised within the V8 engine API itself, standard JavaScript exception handlers cannot intercept or mitigate the crash. The operating system receives a SIGABRT signal, terminating the active thread and parent Node.js process immediately with exit code 134. This makes the bug class a reachable assertion (CWE-617) rather than a standard catchable JavaScript error.

Code Analysis

The vulnerable implementation of WrappedRE2::Replace in lib/replace.cc failed to handle allocation failures when processing replacement buffers and strings. The primary issue was the immediate execution of .ToLocalChecked() on the results of Nan::CopyBuffer and Nan::New.

// Vulnerable implementation
argv.push_back(Nan::CopyBuffer(data, item.size()).ToLocalChecked());
// ...
argv.push_back(Nan::New(data, item.size()).ToLocalChecked());
// ...
if (replacee.isBuffer)
{
    info.GetReturnValue().Set(Nan::CopyBuffer(result.data(), result.size()).ToLocalChecked());
    return;
}
info.GetReturnValue().Set(Nan::New(result).ToLocalChecked());

The patch implemented in version 1.25.1 refactored these calls to capture the returned v8::MaybeLocal handle first. The code now tests the handle using .IsEmpty(). If the allocation fails, the addon invokes Nan::ThrowRangeError to queue a standard JavaScript RangeError and returns early.

// Patched implementation in version 1.25.1
auto buffer = Nan::CopyBuffer(data, item.size());
if (buffer.IsEmpty())
{
    Nan::ThrowRangeError("Invalid string length");
    return Nan::Nothing<std::string>();
}
argv.push_back(buffer.ToLocalChecked());
 
auto text = Nan::New(data, item.size());
if (text.IsEmpty())
{
    Nan::ThrowRangeError("Invalid string length");
    return Nan::Nothing<std::string>();
}
argv.push_back(text.ToLocalChecked());

This structural modification changes the outcome of an allocation failure from a process-terminating C++ assertion to a standard JavaScript exception. Since the range error is registered within the V8 context before returning, the JavaScript runtime can intercept the error via standard try-catch structures. This effectively addresses the vulnerability by preserving process availability.

Exploitation Methodology

To exploit CVE-2026-71430, an attacker must supply inputs to a regular expression replace operation that generate an output string exceeding the maximum string length permitted by V8. This maximum length, defined by v8::String::kMaxLength, is typically 512 MB on 32-bit platforms and 1 GB on 64-bit systems.

This length restriction can be exceeded using output-amplifying replacement templates, specifically the trailing-context selector $' and the leading-context selector `$``. These templates instruct the engine to replace each match with the remainder or precursor of the source string, respectively. If a target regular expression matches multiple characters globally throughout a long string, the output size grows quadratically relative to the input length.

For example, given an input string of 50,000 characters consisting of the character 'a', applying a global replace of 'a' with $' yields a cumulative series of substring copies. The length of the output is calculated as the sum of integers from 1 to 50,000, which is approximately 1.25 billion characters. When the addon attempts to construct the final JavaScript string containing this 1.25 GB result, V8 returns an empty handle, triggering the assertion failure and terminating the process.

Impact & Security Assessment

The primary consequence of exploiting CVE-2026-71430 is a complete denial of service (DoS) of the Node.js runtime process. Because the crash occurs via a native SIGABRT signal, standard high-level application frameworks (such as Express, NestJS, or Koa) cannot recover from the crash, causing all active connections to drop and taking the service offline.

The CVSS v3.1 score is calculated as 6.2 (Medium) with the vector CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The attack vector is classified as Local (AV:L) because it relies on passing arguments directly into local library APIs. However, if an application exposes regex replacement parameters or processes user-supplied template strings via node-re2 over a network interface, the practical severity escalates to a remote denial of service.

The vulnerability is categorized under CWE-617: Reachable Assertion. While the flaw does not allow remote code execution or confidential data exposure, its impact on service availability is absolute. In single-process deployments without automated orchestrators (like Kubernetes or PM2), a single request can permanently disable the application until manual intervention occurs.

Remediation & Defenses

The primary mitigation for CVE-2026-71430 is upgrading the re2 npm package to version 1.25.1 or later. This version introduces the necessary validation of v8::MaybeLocal allocations, converting native crashes into catchable JavaScript RangeError exceptions.

For legacy systems where immediate package updates are not feasible, applications should implement input sanitization to restrict the length of both input strings and replacement templates. Specifically, applications must reject or sanitize any user-controlled replacement templates containing the amplification characters $ followed by ' or `. Restricting maximum input lengths to values well below the V8 allocation limits (e.g., limiting inputs to less than 1 MB) prevents the quadratic expansion from reaching the threshold required to trigger the allocation failure.

Additionally, production deployments should employ robust process monitoring and orchestration tools. Systems like Kubernetes, PM2, or systemd should be configured to automatically restart crashed Node.js worker instances. While process restarts do not fix the root vulnerability, they minimize the duration of the denial of service.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.2/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Systems

Applications utilizing the 're2' npm package (< 1.25.1) on Node.js runtimes.

Affected Versions Detail

Product
Affected Versions
Fixed Version
re2
uhop
< 1.25.11.25.1
AttributeDetail
CWE IDCWE-617: Reachable Assertion
Attack VectorLocal (escalatible to Network/Remote under specific application configurations)
CVSS Score6.2 (Medium)
Exploit StatusProof of Concept (PoC) verified
ImpactDenial of Service (DoS) via native process abort

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-617
Reachable Assertion

The program contains an assert() or similar statement that can be triggered by an attacker, leading to process termination.

Vulnerability Timeline

Initial security refactoring and code updates initiated in node-re2 codebase.
2026-06-16
Official fix committed to lib/replace.cc addressing handle validation.
2026-07-07
Release of node-re2 version 1.25.1 containing the fix.
2026-07-07
Vulnerability published to the National Vulnerability Database (NVD).
2026-08-06

References & Sources

  • [1]GitHub Security Advisory GHSA-8hcv-x26h-mcgp
  • [2]Fix Commit
  • [3]CVE-2026-71430 on CVE.org

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
6 views•10 min read
•1 day ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
14 views•12 min read
•1 day ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•1 day ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
13 views•10 min read
•1 day ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
15 views•10 min read
•1 day ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read