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

CVE-2026-27904: minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions

February 26, 2026

Nested *() extglobs produce regexps with nested unbounded quantifiers (e.g. (?:(?:a|b)*)*), which exhibit catastrophic backtracking in V8. With a 12-byte pattern *(*(*(a|b))) and an 18-byte non-matching input, minimatch() stalls for over 7 seconds. Adding a single nesting level or a few input characters pushes this to minutes. This is the most severe finding: it is triggered by the default minimatch() API with no special options, and the minimum viable pattern is only 12 bytes. The same issue affects +() extglobs equally.


References

  • github.com/advisories/GHSA-23c5-xmqv-rm74
  • github.com/isaacs/minimatch
  • github.com/isaacs/minimatch/commit/11d0df6165d15a955462316b26d52e5efae06fce
  • github.com/isaacs/minimatch/security/advisories/GHSA-23c5-xmqv-rm74
  • nvd.nist.gov/vuln/detail/CVE-2026-27904

Code Behaviors & Features

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

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.4, all versions starting from 4.0.0 before 4.2.5, all versions starting from 5.0.0 before 5.1.8, all versions starting from 6.0.0 before 6.2.2, all versions starting from 7.0.0 before 7.4.8, all versions starting from 8.0.0 before 8.0.6, all versions starting from 9.0.0 before 9.0.7, all versions starting from 10.0.0 before 10.2.3

Fixed versions

  • 10.2.3
  • 9.0.7
  • 8.0.6
  • 7.4.8
  • 6.2.2
  • 5.1.8
  • 4.2.5
  • 3.1.4

Solution

Upgrade to versions 10.2.3, 3.1.4, 4.2.5, 5.1.8, 6.2.2, 7.4.8, 8.0.6, 9.0.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

Source file

npm/minimatch/CVE-2026-27904.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 24 Mar 2026 12:17:51 +0000.