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

Published Oct 28, 2026
·
Updated

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 Software

1 affected component
npm/re2js>=2.2.0<2.8.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade RE2JS to a version that resolves this vulnerability.

    Fixed in 2.8.7

Event History

Oct 28, 2026
CVE Published
via MITRE·05:14 PM
Data Sourced
via MITRE·05:14 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this denial-of-service condition?

Applications using re2js versions 2.2.0 through 2.8.7 are exposed when LOOKBEHINDS is enabled and they perform repeated matching with matcher().find(), matchAll(), split(), or matcher().replaceAll(). The impact is most relevant when an attacker can influence dense-match input processed by a single-threaded worker.

2

Does an attacker need authentication or user interaction to trigger the issue?

No. The supplied vector indicates network reachability, low attack complexity, no privileges required, and no user interaction, provided the application exposes a path that processes attacker-influenced text with the affected configuration and APIs.

3

What is the recommended remediation?

Update re2js to version 2.8.7, which fixes the issue. If upgrading cannot happen immediately, avoid enabling LOOKBEHINDS for workloads that use the affected repeated-matching APIs on attacker-influenced input.

4

How can I determine whether a code path is affected?

Check whether the application uses re2js 2.2.0 through 2.8.7, enables LOOKBEHINDS, and invokes matcher().find(), matchAll(), split(), or matcher().replaceAll(). Affected paths repeatedly scan input and may exhibit excessive CPU use when given dense-match attacker-controlled text.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203