CVE-2026-116795 RE2JS: Quadratic-time denial of service in re2js lookbehind matching
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2563031 issue-tracking
- www.cve.org
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/le0pard/re2js/commit/dfdd947785dfa113bdc97416375c246a39458395 patch
- https://github.com/le0pard/re2js/pull/59 patch
- https://github.com/le0pard/re2js/releases/tag/2.8.7
- https://github.com/le0pard/re2js/security/advisories/GHSA-gg6h-894w-4m9c exploit vendor-advisory
- github.com
- github.com product
- ENISA EUVD EUVD-2026-112268 third-party-advisory