Loading...
Skip to main content

CVE-2026-26996 — Vulnerability in minimatch — CVE Details

HIGH

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

Published February 18, 2026Updated September 10, 2026Source: osv

Summary

### 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.

Advisory Timeline

  • First published February 18, 2026 (236 days ago).
  • Last revised September 10, 2026 — 203 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update minimatch to 10.2.1 or later
npm install minimatch@10.2.1
npm
Update minimatch to 3.1.3 or later
npm install minimatch@3.1.3
npm
Update minimatch to 8.0.5 or later
npm install minimatch@8.0.5
npm
Update minimatch to 9.0.6 or later
npm install minimatch@9.0.6
npm
Update minimatch to 4.2.4 or later
npm install minimatch@4.2.4
npm
Update minimatch to 7.4.7 or later
npm install minimatch@7.4.7
npm
Update minimatch to 6.2.1 or later
npm install minimatch@6.2.1
npm
Update minimatch to 5.1.7 or later
npm install minimatch@5.1.7

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (8)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
minimatch
npm
All versions10.2.1
minimatch
npm
All versions3.1.3
minimatch
npm
All versions8.0.5
minimatch
npm
All versions9.0.6
minimatch
npm
All versions4.2.4
minimatch
npm
All versions7.4.7
minimatch
npm
All versions6.2.1
minimatch
npm
All versions5.1.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-26996?
minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2026-26996?
CVE-2026-26996 affects minimatch. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-26996 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-3ppc-4f35-3m26

Related CVEs

  • CVE-2026-27904
    HIGH

    minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions

  • CVE-2026-27903
    HIGH

    minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments

  • CVE-2026-107375
    HIGH

    JHipster: SQL Injection in the Parameter of JHipster-Generated Reactive (WebFlux + R2DBC) Applicationssort

  • CVE-2026-107384
    HIGH

    MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies