minimatch
Ecosystem: npm
Downloads: 3.17 Bln
- 0CriticalAffects 0 versions
- 5HighAffects 26 versions
- 0MediumAffects 0 versions
- 1ModerateAffects 1 version
- 0LowAffects 0 versions
- Critical0 (0.0%)
- High5 (83.3%)
- Medium0 (0.0%)
- Moderate1 (16.7%)
- Low0 (0.0%)
Monthly breakdown
- Critical
- High
- Medium
- Moderate
- Low
- 1 vulnerabilities
- Critical: 0
- High: 0
- Medium: 0
- Moderate: 1
- Low: 0
- 3 vulnerabilities
- Critical: 0
- High: 3
- Medium: 0
- Moderate: 0
- Low: 0
- 1 vulnerabilities
- Critical: 0
- High: 1
- Medium: 0
- Moderate: 0
- Low: 0
- 1 vulnerabilities
- Critical: 0
- High: 1
- Medium: 0
- Moderate: 0
- Low: 0
Vulnerabilities (6)
Known vulnerabilities affecting minimatch, based on data from OSV.
| ID | Severity | Summary | Affected versions | Published | Source |
|---|---|---|---|---|---|
| GHSA-g3hv-75wg-m249 | Moderate | minimatch has potential denial of service via globparts amplificationminimatch 10.2.6 contains an attacker-controlled pattern amplification in firstPhasePreProcess() when optimizationLevel >= 2. researcher: Reid Downing (b1nv0id) files: - src/index.ts: 690-770 - src/index.ts: 780-796 issue: input-controlled growth of globParts during first-phase preprocessing, followed by quadratic second-phase processing. the **/../ transformation clones a globparts entry and appends the clone to the same globparts array: ``` parts.splice(gs, 1) const other = parts.slice(0) other[gs] = '**' globParts.push(other) ``` this occurs inside a do...while (didSomething) fixpoint |
| GitHub (opens in a new tab) | |
| GHSA-23c5-xmqv-rm74 | High | minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions### Summary 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. --- ### Details The root cause is in `AST.to |
| GitHub (opens in a new tab) | |
| GHSA-7r86-cg39-jmmj | High | minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments### Summary `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. --- ### Details The vulnerable loop is in `matchOne()` at [`src/index.ts#L960`](https://github.com/isaacs/m |
| GitHub (opens in a new tab) | |
| GHSA-3ppc-4f35-3m26 | High | 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. Pointin |
| GitHub (opens in a new tab) | |
| GHSA-f8q6-p94x-37v3 | High | minimatch ReDoS vulnerabilityA 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. |
| GitHub (opens in a new tab) | |
| GHSA-hxm2-r34f-qmc5 | High | Regular Expression Denial of Service in minimatchAffected versions of `minimatch` are vulnerable to regular expression denial of service attacks when user input is passed into the `pattern` argument of `minimatch(path, pattern)`. ## Proof of Concept ```js var minimatch = require(“minimatch”); // utility function for generating long strings var genstr = function (len, chr) { var result = “”; for (i=0; i<=len; i++) { result = result + chr; } return result; } var exploit = “[!” + genstr(1000000, “\\”) + “A”; // minimatch exploit. console.log(“starting minimatch”); minimatch(“foo”, exploit); console.log(“finishing minimatch”); ` |
| GitHub (opens in a new tab) |
- GHSA-g3hv-75wg-m249Moderateminimatch has potential denial of service via globparts amplification
>= 7.0.0, < 11.0.1
minimatch 10.2.6 contains an attacker-controlled pattern amplification in firstPhasePreProcess() when optimizationLevel >= 2. researcher: Reid Downing (b1nv0id) files: - src/index.ts: 690-770 - src/index.ts: 780-796 issue: input-controlled growth of globParts during first-phase preprocessing, followed by quadratic second-phase processing. the **/../ transformation clones a globparts entry and appends the clone to the same globparts array: ``` parts.splice(gs, 1) const other = parts.slice(0) other[gs] = '**' globParts.push(other) ``` this occurs inside a do...while (didSomething) fixpoint
CVE: CVE-2026-118764
- GHSA-23c5-xmqv-rm74Highminimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions
>= 10.0.0, < 10.2.3>= 9.0.0, < 9.0.7- +6 more
Affected versions:>= 10.0.0, < 10.2.3>= 9.0.0, < 9.0.7>= 8.0.0, < 8.0.6>= 7.0.0, < 7.4.8>= 6.0.0, < 6.2.2>= 5.0.0, < 5.1.8>= 4.0.0, < 4.2.5< 3.1.4
### Summary 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. --- ### Details The root cause is in `AST.to
CVE: CVE-2026-27904
- GHSA-7r86-cg39-jmmjHighminimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments
>= 10.0.0, < 10.2.3>= 9.0.0, < 9.0.7- +6 more
Affected versions:>= 10.0.0, < 10.2.3>= 9.0.0, < 9.0.7>= 8.0.0, < 8.0.6>= 7.0.0, < 7.4.8>= 6.0.0, < 6.2.2>= 5.0.0, < 5.1.8>= 4.0.0, < 4.2.5< 3.1.3
### Summary `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. --- ### Details The vulnerable loop is in `matchOne()` at [`src/index.ts#L960`](https://github.com/isaacs/m
CVE: CVE-2026-27903
- GHSA-3ppc-4f35-3m26Highminimatch has a ReDoS via repeated wildcards with non-matching literal in pattern
>= 10.0.0, < 10.2.1>= 9.0.0, < 9.0.6- +6 more
Affected versions:>= 10.0.0, < 10.2.1>= 9.0.0, < 9.0.6>= 8.0.0, < 8.0.5>= 7.0.0, < 7.4.7>= 6.0.0, < 6.2.1>= 5.0.0, < 5.1.7>= 4.0.0, < 4.2.4< 3.1.3
### 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. Pointin
CVE: CVE-2026-26996
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.
CVE: CVE-2022-3517
- GHSA-hxm2-r34f-qmc5HighRegular Expression Denial of Service in minimatch
< 3.0.2
Affected versions of `minimatch` are vulnerable to regular expression denial of service attacks when user input is passed into the `pattern` argument of `minimatch(path, pattern)`. ## Proof of Concept ```js var minimatch = require(“minimatch”); // utility function for generating long strings var genstr = function (len, chr) { var result = “”; for (i=0; i<=len; i++) { result = result + chr; } return result; } var exploit = “[!” + genstr(1000000, “\\”) + “A”; // minimatch exploit. console.log(“starting minimatch”); minimatch(“foo”, exploit); console.log(“finishing minimatch”); `
CVE: CVE-2016-10540