GHSA-g3hv-75wg-m249

Suggest an improvement
Source
https://github.com/advisories/GHSA-g3hv-75wg-m249
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-g3hv-75wg-m249/GHSA-g3hv-75wg-m249.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-g3hv-75wg-m249
Aliases
Published
2026-10-30T23:09:55Z
Modified
2026-10-30T23:15:07Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
minimatch has potential denial of service via globparts amplification
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.

Database specific
{
    "cwe_ids":  [
        "CWE-405"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-30T23:09:55Z",
    "nvd_published_at":  "2026-10-29T17:18:07Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / minimatch

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
11.0.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-g3hv-75wg-m249/GHSA-g3hv-75wg-m249.json"