Vulnerability · Published Oct 28, 2026 · Assigned by GitHub_M

CVE-2026-116795RE2JS: Quadratic-time denial of service in re2js lookbehind matching

High 7.5

In plain English

A high-severity regular-expression denial of service in re2js from le0pard. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 40% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.5%top 59.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching. From 2.2.0 until 2.8.7, enabling LOOKBEHINDS and using repeated matching through matcher().find(), matchAll(), split(), or matcher().replaceAll() can cause quadratic total work. Machine.match restarts lookbehind scanning from offset zero for each requested start position, while Matcher-based APIs request capture slots that prevent the early exit used for captureless matching. Dense matches therefore repeatedly rescan the input, allowing attacker-influenced text to monopolize a single-threaded worker and deny service. This issue is fixed in version 2.8.7.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmre2js2.8.7GHSA-gg6h-894w-4m9c

Affected products (as reported)

VendorProductVersions
le0pard re2js >= 2.2.0, < 2.8.7

Weakness: CWE-407, CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References