Vulnerabilities in pkg:npm/minimatch
PACKAGECVE-2026-141514 is a LOW (CVSS 3.7) proto key bypasses cache-key weighting vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting minimatch libraries in the npm ecosystem. The issue involves proto key bypasses cache-key weighting in minimatch's shared matcher cache. Remediation is available by upgrading affected packages to version 11.0.10.
pkg:npm/minimatch
Vulnerability advisories affecting package pkg:npm/minimatch. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3924-r96c-gp9w | CVE-2026-141514 | LOW | minimatch: Proto Key Bypasses Cache-Key Weighting in minimatch's Shared Matcher Cache |
| GHSA-c859-jr93-m5j4 | CVE-2026-140006 | MODERATE | minimatch: minimatch.escape() output matches more or less than the literal input |
| GHSA-hqmv-qgp3-jx75 | CVE-2026-140007 | MODERATE | minimatch: Global pattern cache retains large expansions, enabling memory exhaustion |
| GHSA-cf2h-pxjq-68xw | CVE-2026-140008 | HIGH | minimatch: Quadratic compile time for long wildcard patterns (regression in 11.0.0 `mergeRows`) |
| GHSA-7r86-cg39-jmmj | CVE-2026-27903 | HIGH | minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments |
| GHSA-23c5-xmqv-rm74 | CVE-2026-27904 | HIGH | minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions |
| GHSA-3ppc-4f35-3m26 | CVE-2026-26996 | HIGH | minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern |
| GHSA-f8q6-p94x-37v3 | CVE-2022-3517 | HIGH | minimatch ReDoS vulnerability |
| GHSA-hxm2-r34f-qmc5 | CVE-2016-10540 | HIGH | Regular Expression Denial of Service in minimatch |
CVE-2026-141514 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-141514
To remediate this vulnerability, upgrade all affected minimatch dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install minimatch@11.0.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls minimatch
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-141514, inspect your project dependencies using npm:
npm ls minimatch
Analyze the terminal output to locate any version of minimatch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.10), your application is affected.
Note: The npm ls minimatch command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In minimatch, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-141514 Affected minimatch Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
minimatch
|
npm |
≥ 11.0.6
< 11.0.10
|
11.0.10
|
References
Frequently Asked Questions
What is CVE-2026-141514?
Which minimatch versions are affected?
What version fixes CVE-2026-141514?
Is minimatch affected?
What is the CVSS score of CVE-2026-141514?
What CWE is associated with CVE-2026-141514?
How can I check npm dependencies for CVE-2026-141514?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3924-r96c-gp9w",
"modified" : "2026-12-04T21:52:16Z",
"published" : "2026-12-04T21:52:16Z",
"aliases" : [ "CVE-2026-141514" ],
"summary" : "minimatch: Proto Key Bypasses Cache-Key Weighting in minimatch's Shared Matcher Cache",
"details" : "### Summary\n\nminimatch's module-global matcher cache can be poisoned by a `__proto__` key in the `options` object passed to `minimatch()`. `optionsKey()` scores that key the same as no options at all, while `copyOptions()`'s bare `for...in` loop re-parents its copy onto the attacker's prototype instead of copying it as an own property — one caller doing this is enough to flip the cached matcher's case-sensitivity for every later, unrelated caller matching the same pattern string.\n\n\n### Details\n\n`src/index.ts:229-234`, `optionsKey()` has no `case '__proto__'`, so it falls through to `default` and contributes weight `0`:\n\n```ts\nconst optionsKey = (o: MinimatchOptions): number | string => {\n for (const k in o) {\n switch (k) {\n // ... no 'case \"__proto__\":' branch ...\n default:\n n += (booleanWeights.get(k) ?? 0) * tri(v)\n```\n\n`src/index.ts:291-296`, `copyOptions()` copies with a plain assignment, not `Object.defineProperty`, so `__proto__` runs through the real setter instead of landing as an own key:\n\n```ts\nconst copyOptions = (o?: MinimatchOptions) => {\n const copy: Record<string, unknown> = {}\n for (const k in o) copy[k] = (o as Record<string, unknown>)[k]\n return copy as MinimatchOptions\n}\n```\n\n`cachedMinimatch()` (`src/index.ts:298-323`) then stores the `Minimatch` built from the poisoned `copyOptions(options)` under the key `optionsKey(options)` returns — the same key a later, option-less call will look up. Neither function has the one missing check that matters here: special-case `__proto__` before it reaches assignment.\n\n\n### Proof of concept\n\n```js\nimport { minimatch } from 'minimatch'\n\nconst smuggled = JSON.parse('{\"__proto__\":{\"nocase\":true}}')\n// attacker's own call — nocase takes effect for them\nconst r1 = minimatch(file, patternLower, smuggled)\n...\n```\n\nThen, with no knowledge of the call above, a second, fully-trusted caller matches the same pattern with zero options:\n\n```js\n// SEPARATE caller, SAME pattern string, DEFAULT options\nconst r2 = minimatch(file, patternLower)\n```\n\n## Result\n\n```\nminimatch(\"FOO-....TXT\", \"foo-....txt\", smuggled) = true\nminimatch(\"FOO-....TXT\", \"foo-....txt\") [no options] = true (expected false)\nminimatch(<untouched UPPER>, <untouched lower pattern>) [no options] = false (expected false)\ncache-poisoned: true\nglobal Object.prototype polluted: NO\n```\n\n`r2 = true` is the proof: a second, independent call with no options at all gets back the attacker's poisoned matcher. The untouched-pattern control stays `false`, and `Object.prototype` itself is never touched — this is cache poisoning, not classic global prototype pollution.\n\n\n### Impact\n\nAny process that relies on the default, process-global `minimatch()` cache to evaluate security-relevant patterns (allow/deny lists, package-name filters) loses the integrity of that decision the moment one code path builds `options` from untrusted JSON — README.md's own stated default, \"compared case sensitively, unless `nocase:true` is set,\" breaks for a bystander caller. This is not remote code execution and not data disclosure — it's a single boolean match-outcome flip, scoped to the shared cache, that persists until the entry is evicted.\n\n## Suggested Fix\n\n```ts\n// copyOptions(): never let __proto__ become the copy's own prototype\nconst copyOptions = (o?: MinimatchOptions) => {\n const copy = Object.create(null) as Record<string, unknown>\n for (const k in o) if (k !== '__proto__') copy[k] = (o as Record<string, unknown>)[k]\n return copy as MinimatchOptions\n}\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "minimatch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.6"
}, {
"fixed" : "11.0.10"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 11.0.9"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/isaacs/minimatch/security/advisories/GHSA-3924-r96c-gp9w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-141514"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/minimatch/commit/1c1198638b1df8fa0d688b55380bbfbe59fee908"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/isaacs/minimatch"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-04T21:52:16Z",
"nvd_published_at" : "2026-12-01T21:17:11Z"
}
}