---
title: "GHSA-3ppc-4f35-3m26: minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern"
description: "High severity. minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern. Affects minimatch; fixed in 10.2.1."
url: https://inlinr.com/advisories/GHSA-3ppc-4f35-3m26
lang: en
---

[Packages](https://inlinr.com/packages) / [minimatch](https://inlinr.com/packages/minimatch) / [Security](https://inlinr.com/packages/minimatch/security)

High Vulnerability GHSA-3ppc-4f35-3m26 CVE-2026-26996 Published 18 Feb 2026

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

Your version 

Affected releases · [minimatch](https://inlinr.com/packages/minimatch)

- 10.x 10.0.0 – 10.2.0 Fixed in 10.2.1
- 9.x 9.0.0 – 9.0.5 Fixed in 9.0.6
- 8.x 8.0.0 – 8.0.4 Fixed in 8.0.5
- 7.x 7.0.0 – 7.4.6 Fixed in 7.4.7
- 6.x 6.0.0 – 6.2.0 Fixed in 6.2.1
- 5.x 5.0.0 – 5.1.6 Fixed in 5.1.7
- 4.x 4.0.0 – 4.2.3 Fixed in 4.2.4
- 3.x 3.0.0 – 3.1.2 Fixed in 3.1.3
- 2.x and older 0.0.1 – 2.0.10 No fix, no longer updated

On 10.x, the newest line:

```
npm install minimatch@10.2.1
```

Every release on a timeline

11.x 

1. Not affected

11.0.0 – 11.0.9  
10 releases, latest

10.x 

1. Affected

10.0.0 – 10.2.0  
9 releases
2. Fixed

10.2.1 – 10.2.6  
6 releases

9.x 

1. Affected

9.0.0 – 9.0.5  
6 releases
2. Fixed

9.0.6 – 9.0.9  
4 releases

8.x 

1. Affected

8.0.0 – 8.0.4  
5 releases
2. Fixed

8.0.5 – 8.0.7  
3 releases

7.x 

1. Affected

7.0.0 – 7.4.6  
16 releases
2. Fixed

7.4.7 – 7.4.9  
3 releases

6.x 

1. Affected

6.0.0 – 6.2.0  
17 releases
2. Fixed

6.2.1 – 6.2.3  
3 releases

5.x 

1. Affected

5.0.0 – 5.1.6  
9 releases
2. Fixed

5.1.7 – 5.1.9  
3 releases

4.x 

1. Affected

4.0.0 – 4.2.3  
7 releases
2. Fixed

4.2.4 – 4.2.6  
3 releases

3.x 

1. Affected

3.0.0 – 3.1.2  
11 releases
2. Fixed

3.1.3 – 3.1.5  
3 releases

2.x 

1. Affected

2.0.0 – 2.0.10  
11 releases

1.x 

1. Affected

1.0.0  
1 release

0.x 

1. Affected

0.0.1 – 0.4.0  
25 releases

155 stable releases of minimatch, oldest to newest, one row per major.

## What happens

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](https://github.com/ljharb) for back-porting the fix to legacy versions of minimatch.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: high

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

## References

- [Reference](https://github.com/isaacs/minimatch/security/advisories/GHSA-3ppc-4f35-3m26 "https://github.com/isaacs/minimatch/security/advisories/GHSA-3ppc-4f35-3m26")  
github.com/isaacs/minimatch/security/advisories…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-26996 "https://nvd.nist.gov/vuln/detail/CVE-2026-26996")  
nvd.nist.gov/vuln/detail/CVE-2026-26996
- [Fix commit](https://github.com/isaacs/minimatch/commit/2e111f3a79abc00fa73110195de2c0f2351904f5 "https://github.com/isaacs/minimatch/commit/2e111f3a79abc00fa73110195de2c0f2351904f5")  
2e111f3
- [Package](https://github.com/isaacs/minimatch "https://github.com/isaacs/minimatch")  
github.com/isaacs/minimatch

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
