Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. re2
  4. ›
  5. CVE-2026-71498

CVE-2026-71498: node-re2: Out-of-bounds heap read in `replace`/`split` via a `Buffer` ending in a truncated multi-byte UTF-8 character → adjacent heap memory disclosed to JavaScript

August 6, 2026

re2 infers a character’s byte length from its UTF-8 lead byte alone, with no bound on the bytes actually remaining in the input. Buffer arguments reach the native layer verbatim — only strings are re-encoded into well-formed UTF-8 — so a Buffer whose last byte is a multi-byte lead promises continuation bytes that are not there, and the result builders read up to 3 bytes past the end of the buffer. In replace() and split() those bytes are copied into the returned Buffer, disclosing adjacent heap memory to JavaScript. The trigger is deterministic and requires no special heap grooming.

Only Buffer input is affected. String input was never at risk: re-encoding guarantees every multi-byte sequence is complete.

References

  • github.com/advisories/GHSA-j4r3-hg7j-8chg
  • github.com/uhop/node-re2/commit/9d72042a6a0da5bc523908b04808ea0e23867cc4
  • github.com/uhop/node-re2/issues/272
  • github.com/uhop/node-re2/security/advisories/GHSA-j4r3-hg7j-8chg
  • nvd.nist.gov/vuln/detail/CVE-2026-71498

Code Behaviors & Features

Detect and mitigate CVE-2026-71498 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.26.1

Fixed versions

  • 1.26.1

Solution

Upgrade to version 1.26.1 or above.

Impact 5.1 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

npm/re2/CVE-2026-71498.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:52 +0000.