Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-26996

minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern
Back to all
CVE

CVE-2026-26996

minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern

Summary

minimatch is vulnerable to Regular Expression Denial of Service (ReDoS) when a glob pattern contains many consecutive * wildcards followed by a literal character that doesn't appear in the test string. Each * compiles to a separate [^/]*? regex group, and when the match fails, V8's regex engine backtracks exponentially across all possible splits.

The time complexity is O(4^N) where N is the number of * characters. With N=15, a single minimatch() call takes ~2 seconds. With N=34, it hangs effectively forever.

Details

Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.

PoC

When minimatch compiles a glob pattern, each * becomes [^/]*? in the generated regex. For a pattern like ***************X***:

/^(?!\.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?X[^/]*?[^/]*?[^/]*?$/

When the test string doesn't contain X, the regex engine must try every possible way to distribute the characters across all the [^/]*? groups before concluding no match exists. With N groups and M characters, this is O(C(N+M, N)) — exponential.

Impact

Any application that passes user-controlled strings to minimatch() as the pattern argument is vulnerable to DoS. This includes:

  • File search/filter UIs that accept glob patterns
  • .gitignore-style filtering with user-defined rules
  • Build tools that accept glob configuration
  • Any API that exposes glob matching to untrusted input

----

Thanks to @ljharb for back-porting the fix to legacy versions of minimatch.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.7
-
4.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Related Resources

No items found.

References

https://github.com/isaacs/minimatch/security/advisories/GHSA-3ppc-4f35-3m26, https://nvd.nist.gov/vuln/detail/CVE-2026-26996, https://github.com/isaacs/minimatch/commit/2e111f3a79abc00fa73110195de2c0f2351904f5, https://github.com/isaacs/minimatch

Severity

7.5

CVSS Score
0
10

Basic Information

Base CVSS
7.5
EPSS Probability
0.00026%
EPSS Percentile
0.07659%
Introduced Version
10.0.0,9.0.4,9.0.0,8.0.0,7.0.0,6.0.0,5.0.0,4.0.0,0.1.1,0.2.3,0.0.1,0
Fix Available
10.2.1,9.0.6,8.0.5,7.4.7,6.2.1,5.1.7,4.2.4,3.1.3,2.332.0-r0,3.12.7.2-r2,3.6.19-r5,3.7.13-r0,4.0.4-r6,4.106.3-r5,2.1.1-r4,8.17.10-r12,8.19.12-r2,9.0.8-r13,9.1.10-r6,9.2.5-r5,9.3.0-r2,1.10.0-r12,2.95.12-r11,3.155.1-r2,2.95.12-r13,3.155.1-r1,9.0.4-r3,12.2.0-r2,11.10.1-r0,2.19.4-r15,2.19.4-r13,3.5.0-r6,3.5.0-r9,5.14.3-r8,3.223.0-r1,3.0.3-r1,43.38.0-r1,14.2.6-r0,7.5.7-r10,5.5.0-r5,5.5.0-r6,22.0.3-r2,23.0.2-r1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading