Skip to content

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

HighCVSS 7.5 EPSS 0.53%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial

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.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
npm re2js(npm) >= 2.2.0, < 2.8.7 2.8.7 Fixed
le0pard re2js = >= 2.2.0, < 2.8.7 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
le0pard re2js = >= 2.2.0, < 2.8.7 No fix listed
npm re2js(npm) >= 2.2.0, < 2.8.7 2.8.7

References