npm
CVE-2026-140007
minimatch: Global pattern cache retains large expansions, enabling memory exhaustion
- Severity
- Medium 5.9
- Published
- 1 Dec 2026
- Last changed
- 1 Dec 2026
- Added to UpHeron
- 1 Dec 2026
- Fixed in
- 11.0.8
- Exploit chance
- 0.5% in the next 30 daysHigher than 41% of CVEs. EPSS by FIRST, 1 Dec 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-hqmv-qgp3-jx75
- Sources
- OSV.dev and GitHub
Description
minimatch 11.0.3 through 11.0.7 retain the 256 most recent compiled Minimatch objects in a module-level cache. The cache is bounded only by entry count; each object can retain up to 100,000 expanded pattern rows. An application that passes untrusted, unique patterns to the top-level minimatch() function can therefore be terminated with a few very small inputs.
Commit 52d2aecceb71dae7f1b19675e74e044eb472c1e6 changed minimatch() to store each compiled object in a 256-entry Map. The key includes the complete pattern and options, so unique attacker-controlled patterns create distinct retained entries. There is no total cache-weight or per-entry expansion limit below the existing braceExpandMax default of 100,000.
The cache first ships in 11.0.3. Version 11.0.1 is a confirmed negative control.
Applications that accept attacker-controlled glob patterns and call the top-level minimatch() function can be crashed through memory exhaustion.
Affected software
| Software | Affected versions |
|---|---|
minimatchnpm · osv:npm:minimatch |
|
About minimatch
- Weekly downloads (npm)
- 933,407,705npm, 2 Dec 2026
Vulnerabilities in minimatch
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-140006minimatch: minimatch.escape() output matches more or less than the literal inputMedium 5.4 1 Dec 2026
- CVE-2026-140008minimatch: Quadratic compile time for long wildcard patterns (regression in 11.0.0 `mergeRows`)High 1 Dec 2026
- CVE-2026-118764minimatch has potential denial of service via globparts amplificationMedium 30 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-140007
- GitHub Advisory Database https://github.com/advisories/GHSA-hqmv-qgp3-jx75