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.
Severity (CVSS)
| Base score | 7.5 |
|---|---|
| Severity | High |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Provided by | CNA |
Weaknesses
- CWE-407 — CWE-407: Inefficient Algorithmic Complexity
- CWE-1333 — CWE-1333: Inefficient Regular Expression Complexity
Affected products
| Vendor | Product | Versions |
|---|---|---|
| le0pard | re2js | >= 2.2.0, < 2.8.7 [affected] |
References
- https://github.com/le0pard/re2js/security/advisories/GHSA-gg6h-894w-4m9c (x_refsource_CONFIRM)
- https://github.com/le0pard/re2js/pull/59 (x_refsource_MISC)
- https://github.com/le0pard/re2js/commit/dfdd947785dfa113bdc97416375c246a39458395 (x_refsource_MISC)
- https://github.com/le0pard/re2js/releases/tag/2.8.7 (x_refsource_MISC)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 29 Oct 2026 07:02 UTC.