CVE-2026-141514: minimatch Proto Key Bypasses Cache-Key Weighting Vulnerability

LOW
Advisory Identifier: GHSA-3924-r96c-gp9w
CVSS 3.7
CWE-1321
Published
Advisory Summary

CVE-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.

CVE-2026-141514 at a Glance

CVE Identifier CVE-2026-141514
GHSA Identifier GHSA-3924-r96c-gp9w
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product minimatch
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

minimatch fixed: 11.0.10
npm install minimatch@11.0.10
Verify Direct and Transitive Dependencies

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

### Summary minimatch'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. ### Details `src/index.ts:229-234`, `optionsKey()` has no `case '__proto__'`, so it falls through to `default` and contributes weight `0`: ```ts const optionsKey = (o: MinimatchOptions): number | string => { for (const k in o) { switch (k) { // ... no 'case "__proto__":' branch ... default: n += (booleanWeights.get(k) ?? 0) * tri(v) ``` `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: ```ts const copyOptions = (o?: MinimatchOptions) => { const copy: Record<string, unknown> = {} for (const k in o) copy[k] = (o as Record<string, unknown>)[k] return copy as MinimatchOptions } ``` `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. ### Proof of concept ```js import { minimatch } from 'minimatch' const smuggled = JSON.parse('{"__proto__":{"nocase":true}}') // attacker's own call — nocase takes effect for them const r1 = minimatch(file, patternLower, smuggled) ... ``` Then, with no knowledge of the call above, a second, fully-trusted caller matches the same pattern with zero options: ```js // SEPARATE caller, SAME pattern string, DEFAULT options const r2 = minimatch(file, patternLower) ``` ## Result ``` minimatch("FOO-....TXT", "foo-....txt", smuggled) = true minimatch("FOO-....TXT", "foo-....txt") [no options] = true (expected false) minimatch(<untouched UPPER>, <untouched lower pattern>) [no options] = false (expected false) cache-poisoned: true global Object.prototype polluted: NO ``` `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. ### Impact Any 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. ## Suggested Fix ```ts // copyOptions(): never let __proto__ become the copy's own prototype const copyOptions = (o?: MinimatchOptions) => { const copy = Object.create(null) as Record<string, unknown> for (const k in o) if (k !== '__proto__') copy[k] = (o as Record<string, unknown>)[k] return copy as MinimatchOptions } ```

CVE-2026-141514 Affected minimatch Versions

1 component(s)
Fixed Versions:
11.0.10
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?
CVE-2026-141514 is a security vulnerability in minimatch involving Proto Key Bypasses Cache-Key Weighting in minimatch's Shared Matcher Cache under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which minimatch versions are affected?
Affected versions include releases prior to 11.0.10 across affected packages: minimatch.
What version fixes CVE-2026-141514?
Upgrading to 11.0.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is minimatch affected?
Yes, minimatch is affected in releases prior to 11.0.10. Upgrade your dependency to 11.0.10 or later.
What is the CVSS score of CVE-2026-141514?
CVE-2026-141514 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-141514?
CVE-2026-141514 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (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.).
How can I check npm dependencies for CVE-2026-141514?
Run the dependency tree command: 'npm ls minimatch'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}