Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-71430
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 11:34 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 6 Aug 2026, 21:19 UTC

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.

osv:CVE-2026-71430
Complete source record
{
  "id": "8c958bfdd52ddcc784c1ddbc9cce7d9b36b3d5e7ec2ce5f7b4a1f9cb87dc5ee9",
  "url": "https://osv.dev/vulnerability/CVE-2026-71430",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "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",
    "summary": "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.",
    "evidence": "osv:CVE-2026-71430",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-71430",
      "aliases": [
        "CVE-2026-71430",
        "GHSA-8hcv-x26h-mcgp"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/uhop/node-re2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "162ea7c5c90c755d4d0733f841cfa4788e13de56"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.25.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.25.1"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.25.0",
            "1.24.1",
            "1.24.0",
            "1.23.3",
            "1.23.2",
            "1.23.1",
            "1.23.0",
            "1.22.3",
            "1.22.2",
            "1.22.1",
            "1.22.0",
            "1.21.5",
            "1.21.4",
            "1.21.3",
            "1.21.2",
            "1.21.1",
            "1.21.0",
            "1.20.12",
            "1.20.11",
            "1.20.10",
            "1.20.9",
            "1.20.8",
            "1.20.7",
            "1.20.6",
            "1.20.5",
            "1.20.4",
            "1.20.3",
            "1.20.2",
            "1.20.1",
            "1.20.0",
            "1.19.2",
            "1.19.1",
            "1.19.0",
            "1.18.3",
            "1.18.2",
            "1.18.1",
            "1.18.0",
            "1.17.8",
            "1.17.7",
            "1.17.6",
            "1.17.5",
            "1.17.4",
            "1.17.3",
            "1.17.2",
            "1.17.1",
            "1.17.0",
            "1.16.0",
            "1.15.9",
            "1.15.8",
            "1.15.7",
            "1.15.6",
            "1.15.5",
            "1.15.4",
            "1.15.3",
            "1.15.2",
            "1.15.1",
            "1.15.0",
            "1.14.0",
            "1.13.0",
            "1.12.1",
            "1.12.0",
            "1.11.0",
            "1.10.5",
            "1.10.4",
            "1.10.3",
            "1.10.2",
            "1.10.1",
            "1.10.0",
            "1.9.0",
            "1.8.4",
            "1.8.3",
            "1.8.2",
            "1.8.1",
            "1.8.0",
            "1.7.0",
            "1.6.2",
            "1.6.1",
            "1.6.0",
            "1.5.0",
            "1.4.1",
            "1.4.0",
            "1.3.3",
            "1.3.2",
            "1.3.1",
            "1.3.0",
            "1.2.0",
            "1.1.1",
            "1.1.0",
            "1.0.0",
            "0.9.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-71430.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:34.672315214Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71430.json",
        "https://github.com/uhop/node-re2/security/advisories/GHSA-8hcv-x26h-mcgp",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-71430"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-617"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71430.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-71430",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 502068,
  "published_at": "2026-08-06T21:19:32.77+00:00"
}