Skip to content

GHSA-g3hv-75wg-m249 CVE-2026-118764

minimatch has potential denial of service via globparts amplification

Medium npm
Severity
6.9 / 10
Medium · CVSS 4.0
Exploit chance (EPSS)
0.29%
Chance of exploitation in the next 30 days. Higher than 21.75% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-405 Asymmetric Resource Consumption (Amplification)
Fix
11.0.1
Upgrade minimatch to this version or later

Description

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.

Affected versions

npm

PackageVulnerableFixed in
minimatch
< 11.0.1
11.0.1
minimatch
< 11.0.1
11.0.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

minimatch npm → 11.0.1

npm
npm install minimatch@11.0.1
yarn
yarn add minimatch@11.0.1
pnpm
pnpm add minimatch@11.0.1

Severity breakdown

CVSS 4.0 6.9

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

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
Low
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

Weakness

CWE-405: Asymmetric Resource Consumption (Amplification)

The product does not properly control situations in which an adversary can cause the product to consume or produce excessive resources without requiring the adversary to invest equivalent work or otherwise prove authorization, i.e., the adversary's influence is "asymmetric."

How to prevent it
  • Architecture and Design: An application must make resources available to a client commensurate with the client's access level.
  • Architecture and Design: An application must, at all times, keep track of allocated resources and meter their usage appropriately.
  • System Configuration: Consider disabling resource-intensive algorithms on the server side, such as Diffie-Hellman key exchange.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-23c5-xmqv-rm74
minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions
High Also affects minimatch
GHSA-7r86-cg39-jmmj
minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments
High Also affects minimatch
GHSA-3ppc-4f35-3m26
minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern
High Also affects minimatch
GHSA-f8q6-p94x-37v3
minimatch ReDoS vulnerability
High Also affects minimatch
GHSA-hxm2-r34f-qmc5
Regular Expression Denial of Service in minimatch
High Also affects minimatch
GHSA-4vqv-7265-gm2w
pypdf has possible large memory usage for exceptions in strict mode
High Same weakness, CWE-405
GHSA-9fm3-97px-rjf6
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
High Same weakness, CWE-405
GHSA-7hqp-7c5m-4vq6
Microsoft Security Advisory CVE-2026-96960 - .NET and Visual Studio Denial of Service Vulnerability
High Same weakness, CWE-405

Credits: b1nv0id

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor