minimatch

a glob matcher in javascript

Version: 3.0.0 registry icon
Safety score
-20
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security Risks of Known Vulnerabilities
CVE-2016-10540
CWE-20
Threat level: HIGH | CVSS score: 7.5

Minimatch is a minimal matching utility that works by converting glob expressions into JavaScript RegExp objects. The primary function, minimatch(path, pattern) in Minimatch 3.0.1 and earlier is vulnerable to ReDoS in the pattern parameter.



CVE-2026-26996
CWE-1333
Threat level: HIGH | CVSS score: 8

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.



CVE-2026-27903
CWE-407
Threat level: HIGH | CVSS score: 8

matchOne() performs unbounded recursive backtracking when a glob pattern contains multiple non-adjacent ** (GLOBSTAR) segments and the input path does not match. The time complexity is O(C(n, k)) -- binomial -- where n is the number of path segments and k is the number of globstars. With k=11 and n=30, a call to the default minimatch() API stalls for roughly 5 seconds. With k=13, it exceeds 15 seconds. No memoization or call budget exists to bound this behavior.



CVE-2026-27904
CWE-1333
Threat level: HIGH | CVSS score: 8

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.



CVE-2022-3517
CWE-1333
Threat level: HIGH | CVSS score: 7.5

A vulnerability was found in the minimatch package. This flaw allows a Regular Expression Denial of Service (ReDoS) when calling the braceExpand function with specific arguments, resulting in a Denial of Service.



Please note that this component is affected by 2 other vulnerabilities
0 Critical  |  0 High  |  2 Medium  |  0 Low  |  0 Suggest

Latest safe major: 10.2.4 Scan your application codebase with Meterian to see all known vulnerabilities in your open source software dependencies.


Stability

Stay updated with the latest patches and releases. Plan your sofware desisgn. Avoid common known vulnerabilities fixed by the open source community

Latest patch release:   3.0.8

Latest minor release:   3.1.5

Latest major release:   10.2.4

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

ISC   -   ISC License

Not a wildcard

Not proprietary

OSI Compliant