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

> Attackers can cause denial of service in applications using minimatch by providing crafted glob patterns that trigger catastrophic backtracking.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Feb 2026
- **Updated:** 26 Feb 2026
- **Also known as:** CLEANSTART-2026-HA54689, CLEANSTART-2026-LT23543, CLEANSTART-2026-RQ08724, CLSA-2026-1791289858, CLSA-2026-1791292466, CLSA-2026-1792254949, CLSA-2026-1792764805, CLSA-2026-1792809973, DEBIAN-CVE-2026-27904, ECHO-5b49-d442-775c, GHSA-23c5-xmqv-rm74, MINI-23r6-7j6j-p3h4, MINI-2w7r-jwf8-725q, MINI-35g4-4h68-x8fr, MINI-3889-v38g-pfhm, MINI-3f7x-4w76-89wc, MINI-3mpg-pxhw-x8f7, MINI-445g-chfp-gmcc, MINI-4767-368g-x9jm, MINI-47fx-7r2j-mw42, MINI-48vx-4fpc-x9jv, MINI-4hcg-9xq9-v6jf, MINI-4q72-gv57-h7mc, MINI-4rjc-mq66-8qrc, MINI-532r-22cq-g77r, MINI-56px-ww85-vhhv, MINI-5v7f-wmrj-xm33, MINI-676p-xq3c-78mg, MINI-698x-x95f-rhhv, MINI-6fgv-qx5p-62q3, MINI-77cv-vm6x-vhgx, MINI-9j6x-37f5-qfx2, MINI-9jw8-v5cf-g2hf, MINI-9r3h-696r-g42h, MINI-c7ph-3h6r-38m5, MINI-cjvh-6gh8-gw7r, MINI-fvrg-f59v-h62c, MINI-hpwj-9j48-c9xv, MINI-hrv9-8jm5-228f, MINI-j2m9-pp7p-89wq, MINI-jc43-q987-xr68, MINI-jh26-2c43-54fv, MINI-jqvr-hc34-v88p, MINI-mxf4-c68p-qqw8, MINI-mxgq-q2ph-chr4, MINI-ppvf-5699-f8c3, MINI-q7v6-6p3r-wfh8, MINI-rmjw-35g3-f9qj, MINI-rvj7-mwvx-hmxq, MINI-vjwh-jrq3-h86p, MINI-vrf8-cc43-3j85, MINI-w8fp-f32p-v29w, MINI-xmc7-qq2v-794c, MINI-xrpc-wg3x-47qw, MINI-xvf8-6798-37g9, ROOT-APP-NPM-CVE-2026-27904, UBUNTU-CVE-2026-27904, openSUSE-SU-2026:11146-1, openSUSE-SU-2026:11446-1, openSUSE-SU-2026:11447-1

## What is CVE-2026-27904?

CVE-2026-27904 is a high-severity denial of service vulnerability in isaacs minimatch, published on 26 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. Prior to version 10.2.3, 9.0.7, 8.0.6, 7.4.8, 6.2.2, 5.1.8, 4.2.5, and 3.1.4, 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. Versions 10.2.3, 9.0.7, 8.0.6, 7.4.8, 6.2.2, 5.1.8, 4.2.5, and 3.1.4 fix the issue.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-27904?

16 open source packages ship an affected version, including minimatch. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `minimatch` | npm | All versions | 3.1.4 |
| `minimatch` | npm | All versions | 3.1.4 |
| `minimatch` | npm | From 10.0.0 | 10.2.3 |
| `minimatch` | npm | From 10.0.0 | 10.2.3 |
| `minimatch` | npm | From 4.0.0 | 4.2.5 |
| `minimatch` | npm | From 4.0.0 | 4.2.5 |
| `minimatch` | npm | From 5.0.0 | 5.1.8 |
| `minimatch` | npm | From 5.0.0 | 5.1.8 |
| `minimatch` | npm | From 6.0.0 | 6.2.2 |
| `minimatch` | npm | From 6.0.0 | 6.2.2 |
| `minimatch` | npm | From 7.0.0 | 7.4.8 |
| `minimatch` | npm | From 7.0.0 | 7.4.8 |
| `minimatch` | npm | From 8.0.0 | 8.0.6 |
| `minimatch` | npm | From 8.0.0 | 8.0.6 |
| `minimatch` | npm | From 9.0.0 | 9.0.7 |
| `minimatch` | npm | From 9.0.0 | 9.0.7 |
| `cockpit-repos` | openSUSE:Tumbleweed | All versions | 4.9-1.1 |
| `cockpit-subscriptions` | openSUSE:Tumbleweed | All versions | 16.3-1.1 |
| `onnxruntime` | openSUSE:Tumbleweed | All versions | 1.26.0-1.1 |

Products: Minimatch Project Minimatch.

## How do I fix CVE-2026-27904?

Upgrade minimatch to a fixed version for your release line: 3.1.4, 10.2.3, 4.2.5 or 5.1.8.

## Is CVE-2026-27904 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27904 exists.

## Other vulnerabilities in isaacs minimatch

- [CVE-2026-26996](https://insights.sbomify.com/CVE-2026-26996/): minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern (high 8.7)
- [CVE-2026-27903](https://insights.sbomify.com/CVE-2026-27903/): minimatch has a ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments (high 7.5)
- [CVE-2016-10540](https://insights.sbomify.com/CVE-2016-10540/): Regular Expression Denial of Service in minimatch (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-27904 and fix it if it is affected.

What it is: CVE-2026-27904 is a high-severity denial of service vulnerability in isaacs minimatch, published on 26 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27904 exists.

Affected packages and fixed versions:
- minimatch (npm): affected all versions; fixed in 3.1.4
- minimatch (npm): affected all versions; fixed in 3.1.4
- minimatch (npm): affected from 10.0.0; fixed in 10.2.3
- minimatch (npm): affected from 10.0.0; fixed in 10.2.3
- minimatch (npm): affected from 4.0.0; fixed in 4.2.5
- minimatch (npm): affected from 4.0.0; fixed in 4.2.5
- minimatch (npm): affected from 5.0.0; fixed in 5.1.8
- minimatch (npm): affected from 5.0.0; fixed in 5.1.8
- minimatch (npm): affected from 6.0.0; fixed in 6.2.2
- minimatch (npm): affected from 6.0.0; fixed in 6.2.2
- minimatch (npm): affected from 7.0.0; fixed in 7.4.8
- minimatch (npm): affected from 7.0.0; fixed in 7.4.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-27904/ (Markdown: https://insights.sbomify.com/CVE-2026-27904/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-27904
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-27904
- OSV: https://osv.dev/vulnerability/CVE-2026-27904

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-27904/
Summaries are generated and may contain mistakes; the official description above is the record.
