Repository navigation
Update dependency minimatch@>=7 <11.0.1 to v11.0.8 [SECURITY] - #318
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
renovate
Bot
force-pushed
the
renovate/npm-minimatch-=7-11.0.1-vulnerability
branch
from
December 3, 2026 04:44
c1dad2b to
cad509f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.0.5→11.0.8minimatch: Global pattern cache retains large expansions, enabling memory exhaustion
CVE-2026-140007 / GHSA-hqmv-qgp3-jx75
More information
Details
Summary
minimatch 11.0.3 through 11.0.7 retain the 256 most recent compiled
Minimatchobjects 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-levelminimatch()function can therefore be terminated with a few very small inputs.Root cause
Commit
52d2aecceb71dae7f1b19675e74e044eb472c1e6changedminimatch()to store each compiled object in a 256-entryMap. 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 existingbraceExpandMaxdefault of 100,000.The cache first ships in 11.0.3. Version 11.0.1 is a confirmed negative control.
Proof of concept
Install minimatch 11.0.4, save as
poc.mjs, and run withnode --max-old-space-size=128 --expose-gc poc.mjs:On 11.0.4, the process terminates with:
The same command exits normally on 11.0.1. With three calls and the normal heap limit, forced-GC heap grew from 4.36 MB to 112.27 MB and RSS from 50.9 MB to 262.7 MB.
As a smaller repeated control, ten independent processes each compiled ten unique 5,000-expansion patterns. On 11.0.4 the cached top-level function retained a median 17,371,504 heap bytes after forced GC. The direct
new Minimatch()control retained 234,000 bytes, and the 11.0.1 top-level function showed no measurable retained-heap growth.Impact
Applications that accept attacker-controlled glob patterns and call the top-level
minimatch()function can be crashed through memory exhaustion. Applications using only trusted patterns are not exposed. No confidentiality, integrity, filesystem, or code-execution impact is claimed.Confirmed affected: 11.0.3 through 11.0.7. No patched version is currently available.
Suggested remediation
Bound the cache by total retained weight or expansion count and do not cache large compiled patterns. Removing the global cache or making it opt-in for trusted patterns would also prevent the retention.
Duplicate review and disclosure
Public issues, pull requests, and advisories were searched for cache retention, OOM,
braceExpandMax, and the 256-pattern cache. Issues #269 and #270 discuss caching performance but do not document this retention/OOM condition.OpenAI Codex assisted with source review, local reproduction, negative controls, version analysis, duplicate checks, and drafting. All tests were local; no external service was contacted. The account owner reviewed the evidence and explicitly authorized this private submission.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
minimatch: Quadratic compile time for long wildcard patterns (regression in 11.0.0
mergeRows)CVE-2026-140008 / GHSA-cf2h-pxjq-68xw
More information
Details
Summary.
mergeRows()(src/index.ts~813-852, introduced in 2e1d896) iterates every part position and, for each row with a wildcard there, copies and joins the whole row to build a Map key. For a pattern made of many wildcard-only path parts this is quadratic in the number of parts, even with a single row. It runs innew Minimatch, so any uncached pattern pays it.Measured on 11.0.6 with a pattern of
*parts joined by/: 1000 parts 22 ms, 2000 parts 72 ms, 4000 parts 190 ms, 8000 parts 805 ms (about 4× per doubling). Extrapolated to the 64 KB pattern limit (~32,000 parts), one compile blocks for roughly 13 s. A leading brace group of distinct words multiplies the rows and the cost.Suggested fix. Build merge keys incrementally (or hash per position) instead of joining the full row at each position, or skip merging when there is only one row; and count the work against
braceExpandMaxor a new limit.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
isaacs/minimatch (minimatch@>=7 <11.0.1)
v11.0.8Compare Source
v11.0.7Compare Source
mergeRows)Fixes GHSA-cf2h-pxjq-68xw: GHSA-cf2h-pxjq-68xw
v11.0.6Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.