Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. re2js
  4. ›
  5. CVE-2026-116795

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

October 28, 2026

Using the opt-in LOOKBEHINDS flag together with any repeated-matching API (matcher().find() in a loop, matchAll(), split(), matcher().replaceAll()) causes quadratic-time (Θ(n²)) matching, contradicting the library’s own “linear time matching” guarantee. A single call with a 16,000-character input takes 36.7–38.7 seconds of CPU.

References

  • github.com/advisories/GHSA-gg6h-894w-4m9c
  • github.com/le0pard/re2js/commit/dfdd947785dfa113bdc97416375c246a39458395
  • github.com/le0pard/re2js/pull/59
  • github.com/le0pard/re2js/releases/tag/2.8.7
  • github.com/le0pard/re2js/security/advisories/GHSA-gg6h-894w-4m9c
  • nvd.nist.gov/vuln/detail/CVE-2026-116795

Code Behaviors & Features

Detect and mitigate CVE-2026-116795 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.2.0 before 2.8.7

Fixed versions

  • 2.8.7

Solution

Upgrade to version 2.8.7 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity
  • CWE-407: Inefficient Algorithmic Complexity

Source file

npm/re2js/CVE-2026-116795.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:25 +0000.