CVE-2026-116795

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

State
Published
Severity
7.5 High
Published
Oct 28, 2026
Updated
Oct 28, 2026
Reserved
Oct 26, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HGitHub_M

Weaknesses

  • CWE-407 Inefficient Algorithmic Complexity
  • CWE-1333 Inefficient Regular Expression Complexity

Affected Products

ProductVersions
re2jsle0pard
  • >= 2.2.0, < 2.8.7Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.