CVE-2026-141514: minimatch: Proto Key Bypasses Cache-Key Weighting in minimatch's Shared Matcher Cache
minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.6 until 11.0.10, minimatch's module-global matcher cache can be poisoned when an options object passed to minimatch() contains an own proto property. In src/index.ts, optionsKey() assigns that property no cache-key weight while copyOptions() copies it into a normal object, changing the copy's prototype, and cachedMinimatch() stores the resulting matcher in the cache slot used by default options. A later independent caller matching the same pattern without options can therefore receive attacker-influenced behavior, such as case-insensitive matching, which can alter security-relevant allow or deny decisions until the entry is evicted. The effect is scoped to the shared matcher cache and does not modify Object.prototype. This issue is fixed in version 11.0.10.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 11.0.10
Event History
Frequently Asked Questions
What must an attacker be able to do to influence another caller's match result?
They must cause minimatch() to process an options object that has its own proto property for a pattern that will later be matched by another caller without options. The later caller must use the same pattern while the poisoned shared cache entry remains present.
Are callers using default options affected on their own?
A default-options caller is affected only after a matching cache entry for the same pattern has been poisoned by an earlier call. The issue does not modify Object.prototype; its scope is the module-global shared matcher cache.
What can be done if an immediate upgrade is not possible?
Do not pass options objects containing an own proto property to minimatch(), particularly when options can be influenced by untrusted input. This prevents the cache-poisoning condition described for affected releases.
Which versions need remediation?
The issue affects minimatch versions from 11.0.6 until 11.0.10. Upgrade to version 11.0.10, which fixes the issue.