CVE-2026-141514 is a low-severity (CVSS 3.7) CWE-1321 vulnerability in minimatch. A fix is available for minimatch — see the affected versions and patch details below.
minimatch: Proto Key Bypasses Cache-Key Weighting in minimatch's Shared Matcher Cache
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-141514.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
minimatchReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
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:
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:
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
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:
// 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
// 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
}
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | minimatch | ≥ 11.0.6&&< 11.0.10 | 11.0.10npm install minimatch@11.0.10 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for minimatch, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update minimatch to 11.0.10 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-141514 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This flaw is rated as Low severity because successful exploitation requires specific conditions where an application passes attacker-influenced options objects to the matching utility, resulting only in limited integrity impact. In Red Hat environments, minimatch is primarily utilized as a build-time or backend…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2026-141514 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Hardened Images | nodejs24-main-24.22.3-1.hum1 | RHSA-2026:101210 |
| Red Hat Hardened Images | grafana13-2-main-13.2.6-0.1.hum1 | RHSA-2026:102287 |
| Red Hat Hardened Images | prometheus3-14-main-3.14.0-0.1.hum1 | RHSA-2026:104842 |
| Red Hat Hardened Images | grafana-jaeger-datasource-main-13.0.8-0.1.hum1 | RHSA-2026:105102 |
| Red Hat Hardened Images | grafana-loki-datasource-main-13.2.5-0.1.hum1 | RHSA-2026:105104 |
| Red Hat Hardened Images | grafana-prometheus-datasource-main-13.3.0-0.1.hum1 | RHSA-2026:105105 |
| Red Hat Hardened Images | grafana-mysql-datasource-main-13.1.4-0.1.hum1 | RHSA-2026:105106 |
| Red Hat Hardened Images | grafana-postgresql-datasource-main-13.0.7-0.1.hum1 | RHSA-2026:105110 |
Frequently Asked Questions
Is CVE-2026-141514 in your dependencies?
Find it across npm, including transitive dependencies.