MediumGHSA-g3hv-75wg-m249CVE-2026-118764

minimatch has potential denial of service via globparts amplification

Published 30 Oct 2026 · Updated 4 Nov 2026

Is your project on an affected minimatch?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Affected package

Affected
>=7.0.0 <11.0.1
Fixed in
11.0.1
Update to the fixed version for your release line, for example:npm install minimatch@11.0.1

Details

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 loop, allowing generated entries to be processed again.

the expanded globparts array is subsequently processed by secondPhasePreProcess(), which performs pairwise comparisons:

for (let i = 0; i < globParts.length - 1; i++) {
  for (let j = i + 1; j < globParts.length; j++) {
    this.partsMatch(...)
  }
}

an attacker who can supply a glob pattern can therefore cause additional pattern entries to be generated during preprocessing, followed by quadratic pairwise processing, resulting in excessive cpu and memory consumption.

Is GHSA-g3hv-75wg-m249 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected minimatch, and gives you the command that fixes it.

More advisories for minimatch

  • HighCVE-2026-27903minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments · 26 Feb 2026
  • HighCVE-2026-27904minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions · 26 Feb 2026
  • HighCVE-2026-26996minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern · 18 Feb 2026
  • HighCVE-2022-3517minimatch ReDoS vulnerability · 18 Oct 2022
  • HighCVE-2016-10540Regular Expression Denial of Service in minimatch · 9 Oct 2018
minimatch security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.