Description
node-re2 provides RE2 regular expression bindings for Node.js. Prior to version 1.25.1, the WrappedRE2::Replace function built its replacement result and passed it to V8 using ToLocalChecked without checking for the empty MaybeLocal that V8 returns when the resulting string or buffer exceeds V8's maximum string length. When a global replace uses an output amplifying replacement template, the result can grow quadratically with the input size, and once the result exceeds V8's maximum string length, the unchecked ToLocalChecked call causes a fatal, uncatchable process abort instead of a catchable exception. This issue is fixed in version 1.25.1.
Published: 2026-08-06
Score: 6.2 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The issue lies in node‑re2’s WrappedRE2::Replace routine, which constructs replacement strings without checking the result size. When a template that amplifies output is used globally, the resulting string can grow quadratically and eventually surpass V8’s maximum string length. At that point the routine calls ToLocalChecked on an empty MaybeLocal, causing V8 to terminate the process uncatchably. This produces a denial of service by crashing the Node.js application and represents an unchecked return value weakness (CWE‑617) and an integer overflow/underflow risk (CWE‑131).

Affected Systems

The vulnerability affects the node‑re2 library from uhop. All releases earlier than version 1.25.1 are susceptible.

Risk and Exploitability

The CVSS score of 6.2 indicates moderate severity. EPSS is not available, and the vulnerability is not listed in the CISA KEV catalog. An attacker with the ability to supply input to a Node.js application that uses node‑re2 can trigger the crash by providing a large replacement template. The exploit does not require elevated privileges; it only needs the attacker to influence the replace operation. Once activated, the application aborts uncatchably, resulting in a denial of service.

Generated by OpenCVE AI on August 7, 2026 at 13:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade node‑re2 to version 1.25.1 or newer.
  • Validate the size of replacement output before invoking replace, particularly for global or output-amplifying templates, and enforce bounds to prevent exceeding V8’s maximum string length.
  • Refactor code that relies on global replace with a safer implementation or replace node‑re2 with an alternative library that properly handles large strings.

Generated by OpenCVE AI on August 7, 2026 at 13:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8hcv-x26h-mcgp node-re2: String.prototype.replace(re2, template) aborts the Node process (uncatchable ToLocalChecked on empty MaybeLocal) when the result exceeds V8's max string length
History

Fri, 07 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-131
References
Metrics threat_severity

None

threat_severity

Important


Fri, 07 Aug 2026 01:30:00 +0000

Type Values Removed Values Added
First Time appeared Uhop
Uhop node-re2
Vendors & Products Uhop
Uhop node-re2

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description node-re2 provides RE2 regular expression bindings for Node.js. Prior to version 1.25.1, the WrappedRE2::Replace function built its replacement result and passed it to V8 using ToLocalChecked without checking for the empty MaybeLocal that V8 returns when the resulting string or buffer exceeds V8's maximum string length. When a global replace uses an output amplifying replacement template, the result can grow quadratically with the input size, and once the result exceeds V8's maximum string length, the unchecked ToLocalChecked call causes a fatal, uncatchable process abort instead of a catchable exception. This issue is fixed in version 1.25.1.
Title node-re2: String.prototype.replace(re2, template) aborts the Node process (uncatchable ToLocalChecked on empty MaybeLocal) when the result exceeds V8's max string length
Weaknesses CWE-617
References
Metrics cvssV3_1

{'score': 6.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T17:13:08.294Z

Reserved: 2026-08-06T16:28:51.182Z

Link: CVE-2026-71430

cve-icon Vulnrichment

Updated: 2026-08-07T17:10:57.496Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:18:29.963

Modified: 2026-08-07T18:17:23.290

Link: CVE-2026-71430

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-06T21:19:32Z

Links: CVE-2026-71430 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T13:30:03Z

Weaknesses
  • CWE-131

    Incorrect Calculation of Buffer Size

  • CWE-617

    Reachable Assertion