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

CVE-2026-67550: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex` on a non-ASCII subject → uncatchable process crash (DoS)

July 31, 2026

re2 validates the user-settable lastIndex against the subject’s UTF-8 byte length but then uses it as a UTF-16 code-unit count to walk the subject buffer, with no bounds check. For any non-ASCII subject, the byte length is larger than the true character count, so a lastIndex between those two values passes validation while pointing past the end of the buffer. The subsequent walk reads out of bounds. With a large subject the read marches into unmapped memory and the process dies with SIGABRT/SIGSEGV — an uncatchable crash (try/catch cannot stop it), i.e. a denial of service for any worker/process that runs the match. In some cases the out-of-bounds bytes are copied into the returned value (a bounded, best-effort heap information leak).

References

  • github.com/advisories/GHSA-ff84-5f28-78qj
  • github.com/uhop/node-re2/commit/56293de4fc0914d7bc35f92e98de25b0d9bb417d
  • github.com/uhop/node-re2/releases/tag/1.25.2
  • github.com/uhop/node-re2/security/advisories/GHSA-ff84-5f28-78qj
  • nvd.nist.gov/vuln/detail/CVE-2026-67550

Code Behaviors & Features

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

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.25.2

Fixed versions

  • 1.25.2

Solution

Upgrade to version 1.25.2 or above.

Impact 5.7 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

npm/re2/CVE-2026-67550.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:16:53 +0000.