Skip to content
OpenAdvisories
High · 7.5 CVE-2026-116795 EUVD-2026-112268GHSA-gg6h-894w-4m9c

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

Published Oct 28, 2026 · Updated Nov 2, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
le0pard re2js >= 2.2.0, < 2.8.7 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling renovate 44.198.3-r1 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm re2js >= 2.2.0, < 2.8.7 2.8.7 GHSA-gg6h-894w-4m9c

References