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-71498

CVE-2026-71498: Out-of-bounds Heap Read in node-re2 via Truncated Multi-byte UTF-8 Characters

Alon Barad
Alon Barad
Software Engineer

Aug 7, 2026·6 min read·23 visits

Executive Summary (TL;DR)

Passing a raw Node.js Buffer ending in a truncated multi-byte UTF-8 byte to node-re2 (< 1.26.1) causes a 3-byte heap over-read, leaking adjacent heap memory back to the JavaScript runtime.

A medium-severity out-of-bounds (OOB) heap read vulnerability exists in node-re2 prior to version 1.26.1. When a raw binary Node.js Buffer with a truncated multi-byte UTF-8 character at its end is passed to the C++ native addon, the internal lookahead routine getUtf8CharSize() over-reads up to 3 bytes from the heap, leading to memory disclosure.

Vulnerability Overview

CVE-2026-71498 describes a medium-severity out-of-bounds heap read vulnerability affecting node-re2, the Node.js native bindings for Google's RE2 regular expression library. The flaw is present in versions of the re2 npm package prior to 1.26.1. It manifests when processing raw binary Node.js Buffer objects that terminate with a truncated or incomplete multi-byte UTF-8 character sequence.

While standard JavaScript strings are subjected to validation and sanitization by the V8 engine during serialization, Node.js Buffer objects bypass this layer. Consequently, raw and malformed byte sequences are passed directly to the underlying C++ addon. When the native library attempts to parse these sequences, it fails to validate internal pointer boundaries against the physical allocation limits of the buffer.

The vulnerability resides within the utility function used to compute character sizes based on the lead byte. If an input buffer ends abruptly with a lead byte indicating a multi-byte sequence, the module attempts to read forward by the declared character width. This causes the application to read past the end of the allocated buffer, exposing adjacent memory segments on the heap.

Root Cause Analysis

The root cause of CVE-2026-71498 is a lack of boundary verification in the native utility functions of the node-re2 module. The module relies on the fast-path helper function getUtf8CharSize(char ch) defined inside lib/wrapped_re2.h to determine the length of a UTF-8 character sequence. This function determines character width solely by inspecting the bit patterns of the leading byte.

For instance, when encountering a byte with the high bits 11110xxx (such as 0xF0), the bitwise algorithm concludes that the character spans four bytes. This logic operates under the assumption that the input data represents a valid, well-formed UTF-8 stream. It contains no parameters or logical checks to account for the actual remaining length of the memory allocation.

When a truncated sequence is processed, such as a buffer of size 2 ending in 0xF0, the lookahead mechanism is triggered. The iteration loop determines that there is still one byte remaining to process, satisfying basic index checks. However, once getUtf8CharSize returns a size of 4, the application copies four bytes starting from the truncated lead byte, causing a three-byte out-of-bounds read.

Code Analysis

The vulnerable version of node-re2 exposes several file-level callsites where the lookahead check is executed without size boundaries. In files such as lib/replace.cc, lib/split.cc, and lib/pattern.cc, character parsing routines call getUtf8CharSize(ch) with only the character value.

The following code block highlights the vulnerable construction in lib/replace.cc where the over-read occurs:

// Vulnerable path in lib/replace.cc
else if ((size_t)offset < size) {
    // getUtf8CharSize only receives the character byte
    auto sym_size = getUtf8CharSize(data[offset]);  
    // Reads sym_size bytes from current offset, overshooting buffer bounds
    result.append(data + offset, sym_size);         
    byteIndex = offset + sym_size;
}

The issue is resolved in version 1.26.1 by overloading the helper function in lib/wrapped_re2.h to accept the remaining size of the buffer. The new implementation dynamically clamps the returned character size to the actual bytes left in the allocation.

// Patched helper in lib/wrapped_re2.h
inline size_t getUtf8CharSize(char ch, size_t remaining)
{
    size_t size = getUtf8CharSize(ch);
    // Clamps the return value to prevent reading beyond allocation limits
    return size < remaining ? size : remaining; 
}

With this change, all callsites within lib/replace.cc, lib/split.cc, and lib/pattern.cc were updated to calculate the remaining bounds and supply this as the second parameter. For example, getUtf8CharSize(ch) was replaced with getUtf8CharSize(ch, size - i). This modification prevents any possibility of reading past the allocated memory buffer.

Exploitation Methodology

Exploitation of CVE-2026-71498 requires that an application use node-re2 to process untrusted binary input via a Node.js Buffer. The attacker must be able to control or manipulate the contents of the buffer so that it ends with a truncated multi-byte UTF-8 character. Common execution paths include processing user-uploaded file buffers, network packet payloads, or raw stream segments.

No complex heap layout manipulation or administrative privileges are required to trigger the vulnerability. When the malformed buffer is supplied to functions like replace(), split(), or compiled as a pattern using new RE2(), the C++ layer over-reads up to 3 bytes from adjacent heap space.

The leaked adjacent heap bytes are written into the output structure of the operation and returned to the JavaScript runtime as a new Buffer or String. An attacker can repeat this process systematically to leak sequential chunks of heap memory. This can lead to the exposure of sensitive session tokens, internal system variables, or private cryptographic keys stored in memory.

Impact Assessment

The security impact of CVE-2026-71498 is categorized as an information disclosure vulnerability with a CVSS v3.1 base score of 5.1. The confidentiality impact is rated as low because the leakage is limited to a maximum of three bytes per execution. However, because the vulnerability can be triggered repeatedly in a loop, an attacker can reconstruct larger memory segments over time.

In certain execution environments, reading past the boundaries of the heap allocation can trigger a segmentation fault or a memory access violation. This occurs if the out-of-bounds read crosses a memory page boundary into unmapped or protected address space. Under these conditions, the vulnerability can be leveraged to cause a denial-of-service (DoS) condition by crashing the Node.js process.

The vulnerability is local in scope because it requires interaction with a local instance of the node-re2 library. However, if a network-facing Node.js application accepts raw binary uploads and passes them to node-re2, the vulnerability becomes exposable remotely. This expands the operational threat profile of the bug.

Remediation & Patching

The primary remediation path for CVE-2026-71498 is upgrading the re2 npm package to version 1.26.1 or later. This version incorporates the overloaded, boundary-aware getUtf8CharSize checks which mitigate the out-of-bounds reading behavior across all affected native source files.

If upgrading the dependency is not immediately feasible, developers can implement an input sanitation workaround. Before passing any raw Node.js Buffer to a node-re2 function, convert it to a standard JavaScript UTF-8 string. This forces the V8 engine to serialize the input and discard or replace truncated multi-byte characters safely.

// Mitigation wrapper example
function safeReplace(re2Instance, rawBuffer, replacement) {
    // Converts buffer to string, neutralizing truncated multi-byte characters
    const sanitizedInput = rawBuffer.toString('utf8');
    return re2Instance.replace(sanitizedInput, replacement);
}

Organizations should also verify their dependency trees to ensure transitive dependencies utilizing node-re2 are identified and updated. Static analysis tools and software bill of materials (SBOM) scanning can help isolate legacy versions of the package.

Fix Analysis (3)

Technical Appendix

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

Affected Systems

node-re2 (npm package: re2) running on Node.js runtime environments

Affected Versions Detail

Product
Affected Versions
Fixed Version
re2
uhop
< 1.26.11.26.1
AttributeDetail
CWE IDCWE-125 (Out-of-bounds Read)
Attack VectorLocal
CVSS v3.15.1 (Medium)
Exploit StatusPoC (Proof-of-Concept) documented
KEV StatusNot Listed
Impact TypeInformation Disclosure / Memory Leakage

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
CWE-125
Out-of-bounds Read

The product reads data past the end, or before the beginning, of the intended buffer.

Known Exploits & Detection

GitHub Issue #272Demonstration of Buffer with trailing lead byte causing length inflation

References & Sources

  • [1]GitHub Security Advisory GHSA-j4r3-hg7j-8chg
  • [2]node-re2 GitHub Issue #272

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

•18 minutes ago•CVE-2026-105749
6.5

CVE-2026-105749: Unbounded Table Attributes in Docling Backends Leads to Resource Exhaustion

An uncontrolled resource consumption vulnerability exists in the Docling document conversion library. Maliciously structured HTML, JATS, ODS, or BoxNote inputs containing table cells with excessively large 'rowspan' or 'colspan' attribute values trigger algorithmic complexity conditions. This allows unauthenticated remote attackers to initiate resource exhaustion states, crashing or hanging the target document processing pipeline while bypassing configured timeouts.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 1 hour ago•CVE-2026-105748
4.3

CVE-2026-105748: Local File Inclusion and Arbitrary File Disclosure in Docling Document Parser

A Local File Inclusion (LFI) and Arbitrary File Disclosure vulnerability exists in Docling and Docling Slim versions >= 2.16.0 up to 2.131.0. When parsing serialized DoclingDocument structures using the JSON input format, the backend fails to restrict image URI schemes, allowing remote attackers to retrieve local files and verify path existence on the host system during embedded document export.

Amit Schendel
Amit Schendel
3 views•5 min read
•about 2 hours ago•CVE-2026-105744
7.5

CVE-2026-105744: Arbitrary File Read and Remote Code Execution in Docling Tectonic Engine

Docling, a tool for parsing and processing diverse document formats, is vulnerable to arbitrary file read, arbitrary file write, and potential remote code execution (RCE) in versions 2.94.0 through 2.131.0. The vulnerability occurs when applications configure Docling to use the Tectonic engine for rendering TikZ diagrams into images. Because the compilation did not restrict hazardous TeX primitives or sandbox the environment, an attacker can supply crafted documents containing malicious TikZ definitions to access or modify local files and execute arbitrary commands under the privileges of the processing application.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 3 hours ago•CVE-2026-105743
4.0

CVE-2026-105743: Server-Side Request Forgery Guard Bypass in Docling Document Conversion Engine

An SSRF guard bypass vulnerability in the Docling document conversion engine allows unauthenticated attackers to bypass internal IP access controls. The vulnerability exists due to a DNS rebinding Time-of-Check Time-of-Use (TOCTOU) condition, URL authority parsing inconsistencies, and unvalidated network requests triggered during headless browser page rendering.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-105742
3.7

CVE-2026-105742: Sensitive Custom Header Leakage in Docling Image Resource Loader

A technical analysis of CVE-2026-105742 (GHSA-p3fw-7699-7926), a sensitive information disclosure vulnerability in the Docling document processing library. Vulnerable versions of Docling indiscriminately forward custom HTTP headers, such as authentication tokens, to arbitrary third-party origins and during cross-origin redirects while fetching remote image assets from untrusted HTML and EPUB documents.

Alon Barad
Alon Barad
5 views•6 min read
•about 5 hours ago•CVE-2026-106121
4.9

CVE-2026-106121: Denial of Service via Infinite Loop in RabbitMQ Java Client JSON Parser

CVE-2026-106121 is a Denial of Service (DoS) vulnerability in the RabbitMQ Java Client library (amqp-client) affecting versions prior to 5.37.0. The vulnerability resides in the legacy, custom JSON-RPC parsing class com.rabbitmq.tools.json.JSONReader. When parsing malformed or truncated payloads ending within a quoted string or single-line comment, the parser's scanner enters an infinite loop. This occurs because the loop lacks an exit condition for the end-of-input sentinel character returned by the iterator, leading to either CPU exhaustion or a JVM crash from an OutOfMemoryError.

Amit Schendel
Amit Schendel
7 views•6 min read