{"id":"CVE-2026-140007","aliases":["DEBIAN-CVE-2026-140007","DHI-rgb6-ostz-pcfm-fqgh","EUVD-2026-139732","GHSA-hqmv-qgp3-jx75","UBUNTU-CVE-2026-140007"],"status":"published","title":"minimatch: Global pattern cache retains large expansions, enabling memory exhaustion","description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-12-04","score":0.00724,"percentile":0.55423,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true,"poc_reported":true},"cwes":["CWE-400"],"published":"2026-11-30T21:35:25Z","modified":"2026-12-05T00:00:26Z","fixes":[{"ecosystem":"npm","package":"minimatch","fixed_in":["11.0.8"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"11.0.3"},{"last_affected":"11.0.7"},{"fixed":"11.0.8"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.1.1+~5.1.2-1","9.0.3-1","9.0.3-2","9.0.3-3","9.0.3-4","9.0.3-5","9.0.3-6","9.0.7-1","9.0.7-2"]},{"source":"osv","ecosystem":"Debian:13","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.0.3-6","9.0.7-1","9.0.7-2"]},{"source":"osv","ecosystem":"Debian:14","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.0.3-6","9.0.7-1","9.0.7-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"grafana-cloudmonitoring-datasource-12-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.6.7-r0"}]}],"versions":["12.6.7-r0","12.6.7-r1","12.6.7-r2","12.6.7-r3","12.6.7-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"grafana-cloudmonitoring-datasource-12-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.6.7-r0"}]}],"versions":["12.6.7-r0","12.6.7-r1","12.6.7-r2","12.6.7-r3","12.6.7-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"grafana-cloudmonitoring-datasource-12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.6.7-r0"}]}],"versions":["12.6.7-r0","12.6.7-r1","12.6.7-r2","12.6.7-r3","12.6.7-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"grafana-cloudmonitoring-datasource-12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.6.7-r0"}]}],"versions":["12.6.7-r0","12.6.7-r1","12.6.7-r2","12.6.7-r3","12.6.7-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"grafana-zipkin-datasource-12-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.4.13-r0"}]}],"versions":["12.4.13-r0","12.4.13-r1","12.4.13-r2","12.4.13-r3","12.4.13-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"grafana-zipkin-datasource-12-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.4.13-r0"}]}],"versions":["12.4.13-r0","12.4.13-r1","12.4.13-r2","12.4.13-r3","12.4.13-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"grafana-zipkin-datasource-12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.4.13-r0"}]}],"versions":["12.4.13-r0","12.4.13-r1","12.4.13-r2","12.4.13-r3","12.4.13-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"grafana-zipkin-datasource-12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.4.13-r0"}]}],"versions":["12.4.13-r0","12.4.13-r1","12.4.13-r2","12.4.13-r3","12.4.13-r4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"llama-cpp-1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-r0"}]}],"versions":["1.0.0-r0","1.0.0-r1","1.1.0-r0","1.1.0-r1"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"llama-cpp-1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-r0"}]}],"versions":["1.0.0-r0","1.0.0-r1","1.1.0-r0","1.1.0-r1"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"mapbox-mcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.14.0-r1"}]}],"versions":["0.14.0-r1","0.14.0-r2","0.14.0-r3","0.14.0-r4","0.15.0-r0","0.15.1-r0","0.15.1-r1","0.15.1-r2","0.16.0-r0","0.16.0-r1","0.16.0-r2","0.16.0-r3","0.16.0-r4","0.16.0-r5","0.16.0-r6","0.17.0-r0","0.18.0-r0","0.18.1-r0","0.18.1-r1","0.18.1-r2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"mapbox-mcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.14.0-r1"}]}],"versions":["0.14.0-r1","0.14.0-r2","0.14.0-r3","0.14.0-r4","0.15.0-r0","0.15.1-r0","0.15.1-r1","0.15.1-r2","0.16.0-r0","0.16.0-r1","0.16.0-r2","0.16.0-r3","0.16.0-r4","0.16.0-r5","0.16.0-r6","0.17.0-r0","0.18.0-r0","0.18.1-r0","0.18.1-r1","0.18.1-r2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"renovate-44","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"44.190.0-r0"}]}],"versions":["44.190.0-r0","44.190.0-r1","44.206.0-r0","44.218.0-r0","44.224.1-r0","44.224.2-r0","44.225.1-r0","44.225.2-r0","44.226.2-r0","44.227.2-r0","44.227.4-r0","44.230.1-r0","44.235.1-r0","44.235.4-r0","44.236.4-r0","44.237.3-r0","44.239.0-r0","44.239.1-r0","44.241.0-r0","44.242.0-r0","44.247.1-r0","44.247.2-r0","44.249.3-r0","44.251.0-r0","44.252.2-r0","44.252.8-r0","44.253.4-r0","44.255.2-r0","44.256.1-r0","44.257.0-r0","44.257.5-r0","44.257.6-r0","44.257.9-r0","44.259.0-r0","44.260.1-r0","44.261.1-r0","44.262.1-r0","44.262.2-r0","44.263.2-r0","44.263.5-r0","44.263.5-r1","44.264.1-r0","44.264.1-r1","44.264.1-r2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"renovate-44","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"44.190.0-r0"}]}],"versions":["44.190.0-r0","44.190.0-r1","44.206.0-r0","44.218.0-r0","44.224.1-r0","44.224.2-r0","44.225.1-r0","44.225.2-r0","44.226.2-r0","44.227.2-r0","44.227.4-r0","44.230.1-r0","44.235.1-r0","44.235.4-r0","44.236.4-r0","44.237.3-r0","44.239.0-r0","44.239.1-r0","44.241.0-r0","44.242.0-r0","44.247.1-r0","44.247.2-r0","44.249.3-r0","44.251.0-r0","44.252.2-r0","44.252.8-r0","44.253.4-r0","44.255.2-r0","44.256.1-r0","44.257.0-r0","44.257.5-r0","44.257.6-r0","44.257.9-r0","44.259.0-r0","44.260.1-r0","44.261.1-r0","44.262.1-r0","44.262.2-r0","44.263.2-r0","44.263.5-r0","44.263.5-r1","44.264.1-r0","44.264.1-r1","44.264.1-r2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"actions-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.338.2-4"}]}],"versions":["2.338.2-4","2.338.2-5"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"filesystem-mcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2026.7.10-0"}]}],"versions":["2026.7.10-0","2026.8.18-0","2026.8.31-0","2026.8.31-1","2026.8.31-2","2026.8.31-4","2026.8.31-5","2026.8.31-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"grafana-cloudmonitoring-datasource-12-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.6.7-0"}]}],"versions":["12.6.7-0","12.6.7-1","12.6.7-2","12.6.7-3","12.6.7-4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"grafana-cloudmonitoring-datasource-12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.6.7-0"}]}],"versions":["12.6.7-0","12.6.7-1","12.6.7-2","12.6.7-3","12.6.7-4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"grafana-zipkin-datasource-12-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.4.13-0"}]}],"versions":["12.4.13-0","12.4.13-1","12.4.13-2","12.4.13-3","12.4.13-4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"grafana-zipkin-datasource-12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"12.4.13-0"}]}],"versions":["12.4.13-0","12.4.13-1","12.4.13-2","12.4.13-3","12.4.13-4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"kibana-9.5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.5.5-0"}]}],"versions":["9.5.5-0","9.5.5-1","9.5.5-10","9.5.5-11","9.5.5-12","9.5.5-2","9.5.5-3","9.5.5-4","9.5.5-5","9.5.5-6","9.5.5-7","9.5.5-9","9.5.6-0","9.5.6-1","9.5.6-2","9.5.6-3","9.5.7-0","9.5.7-1","9.5.7-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"llama-cpp-1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-0"}]}],"versions":["1.0.0-0","1.0.0-1","1.0.0-2","1.0.0-3","1.1.0-0","1.1.0-1","1.1.0-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"mapbox-mcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.14.0-0"}]}],"versions":["0.14.0-0","0.14.0-1","0.15.0-0","0.15.1-0","0.15.1-1","0.16.0-0","0.16.0-1","0.16.0-2","0.16.0-3","0.17.0-0","0.18.0-0","0.18.1-0","0.18.1-1"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"renovate-44","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"44.190.0-0"}]}],"versions":["44.190.0-0","44.190.0-1","44.212.0-0","44.219.0-0","44.224.2-0","44.225.1-0","44.225.2-0","44.226.2-0","44.227.2-0","44.227.4-0","44.230.1-0","44.235.1-0","44.235.4-0","44.236.4-0","44.237.3-0","44.239.0-0","44.239.1-0","44.242.0-0","44.247.1-0","44.247.2-0","44.249.3-0","44.251.0-0","44.252.2-0","44.252.8-0","44.253.4-0","44.255.2-0","44.256.1-0","44.257.0-0","44.257.5-0","44.257.6-0","44.257.9-0","44.259.0-0","44.260.1-0","44.261.1-0","44.262.1-0","44.262.2-0","44.263.2-0","44.263.5-0","44.263.5-1","44.264.1-0","44.264.1-1","44.264.1-2","44.264.1-3"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"superset","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0-0"}]}],"versions":["6.1.0-0","6.1.0-1","6.1.0-10","6.1.0-11","6.1.0-12","6.1.0-13","6.1.0-14","6.1.0-15","6.1.0-16","6.1.0-17","6.1.0-18","6.1.0-19","6.1.0-2","6.1.0-20","6.1.0-21","6.1.0-22","6.1.0-23","6.1.0-24","6.1.0-25","6.1.0-26","6.1.0-27","6.1.0-28","6.1.0-29","6.1.0-3","6.1.0-30","6.1.0-31","6.1.0-32","6.1.0-33","6.1.0-34","6.1.0-35","6.1.0-36","6.1.0-37","6.1.0-38","6.1.0-39","6.1.0-4","6.1.0-40","6.1.0-41","6.1.0-42","6.1.0-43","6.1.0-44","6.1.0-45","6.1.0-46","6.1.0-5","6.1.0-6","6.1.0-7","6.1.0-8","6.1.0-9"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"uptime-kuma-1","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.23.17-0"}]}],"versions":["1.23.17-0","1.23.17-1","1.23.17-11","1.23.17-12","1.23.17-2","1.23.17-3","1.23.17-4","1.23.17-5","1.23.17-6","1.23.17-7","1.23.17-8","1.23.17-9"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"uptime-kuma-2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.5.0-0"}]}],"versions":["2.5.0-0","2.5.0-1","2.5.0-2","2.5.10-0","2.5.11-0","2.5.11-1","2.5.11-2","2.5.11-3","2.5.12-0","2.5.13-0","2.5.13-1","2.5.3-0","2.5.3-1","2.5.4-0","2.5.5-0","2.5.5-1","2.5.6-0","2.5.7-0","2.5.7-1","2.5.9-0","2.5.9-1"]},{"source":"osv","ecosystem":"npm","package":"minimatch","ranges":[{"type":"SEMVER","events":[{"introduced":"11.0.3"},{"fixed":"11.0.8"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.11-1","0.2.12-1","0.2.12-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.0-1","1.0.0-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.4-1","3.0.4-3","3.0.4-3+deb10u1build0.18.04.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.4-3","3.0.4-4","3.0.4-4ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.4+~3.0.3-1","3.0.4+~3.0.5-1","3.1.1+~3.0.5-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.1.1+~5.1.2-1","9.0.3-4build5"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.0.3-6","9.0.7-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-minimatch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.0.3-6"]}],"products":[{"vendor":"isaacs","product":"minimatch"}],"references":[{"url":"https://github.com/isaacs/minimatch/security/advisories/GHSA-hqmv-qgp3-jx75","tags":["x_refsource_CONFIRM","exploit","advisory","web","report"]},{"url":"https://github.com/isaacs/minimatch/commit/d70a7bbc73140bd771daf5c30869b28dbc48929c","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-140007","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-hqmv-qgp3-jx75","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140007.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-140007","tags":["advisory"]},{"url":"https://scout.docker.com/v/DHI-rgb6-ostz-pcfm-fqgh","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-140007","tags":["advisory","report"]},{"url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-140007","tags":["advisory"]},{"url":"https://github.com/isaacs/minimatch","tags":["package"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-140007","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-140007","title":"minimatch: Global pattern cache retains large expansions, enabling memory exhaustion","description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","status":"published","published":"2026-11-30T21:35:25.548Z","modified":"2026-12-03T15:56:23.888Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-400"],"ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T16:03:49.40245Z"}],"euvd":[{"id":"EUVD-2026-139732","description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","status":"published","published":"2026-11-30T21:35:25Z","modified":"2026-12-03T15:56:23Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-12-03T17:33:08.211585Z"}],"ghsa":[{"id":"GHSA-hqmv-qgp3-jx75","title":"minimatch: Global pattern cache retains large expansions, enabling memory exhaustion","description":"## Summary\n\nminimatch 11.0.3 through 11.0.7 retain the 256 most recent compiled `Minimatch` objects 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-level `minimatch()` function can therefore be terminated with a few very small inputs.\n\n## Root cause\n\nCommit `52d2aecceb71dae7f1b19675e74e044eb472c1e6` changed `minimatch()` to store each compiled object in a 256-entry `Map`. 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 existing `braceExpandMax` default of 100,000.\n\nThe cache first ships in 11.0.3. Version 11.0.1 is a confirmed negative control.\n\n## Proof of concept\n\nInstall minimatch 11.0.4, save as `poc.mjs`, and run with `node --max-old-space-size=128 --expose-gc poc.mjs`:\n\n```js\nimport { minimatch } from 'minimatch'\n\nfor (let i = 0; i \u003c 4; i++) {\n  const pattern = `{1..100000}/unique-${i}`\n  minimatch('no-match', pattern, { optimizationLevel: 2 })\n  global.gc()\n  console.log(i + 1, process.memoryUsage())\n}\n```\n\nOn 11.0.4, the process terminates with:\n\n```text\nFATAL ERROR: Ineffective mark-compacts near heap limit\nAllocation failed - JavaScript heap out of memory\n```\n\nThe 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.\n\nAs 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.\n\n## Impact\n\nApplications 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.\n\nConfirmed affected: 11.0.3 through 11.0.7. No patched version is currently available.\n\n## Suggested remediation\n\nBound 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.\n\n## Duplicate review and disclosure\n\nPublic 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.\n\nOpenAI 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.","status":"published","published":"2026-12-01T18:05:29Z","modified":"2026-12-01T18:05:30Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-12-01T18:30:26.63192Z"}],"nvd":[{"id":"CVE-2026-140007","description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","status":"published","published":"2026-11-30T22:17:30.417Z","modified":"2026-12-03T16:18:00.497Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"secondary"}],"cwes":["CWE-400"],"ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T16:38:14.479295Z"}],"osv":[{"id":"CVE-2026-140007","title":"minimatch: Global pattern cache retains large expansions, enabling memory exhaustion","description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","status":"published","published":"2026-11-30T21:35:25.548Z","modified":"2026-12-04T20:45:20.567526859Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-12-01T21:10:07.386688Z"},{"id":"DEBIAN-CVE-2026-140007","upstream":["CVE-2026-140007"],"description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","status":"published","published":"2026-11-30T22:17:30.417Z","modified":"2026-12-04T09:47:27.524717367Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-12-02T10:34:54.448636Z"},{"id":"DHI-rgb6-ostz-pcfm-fqgh","upstream":["CVE-2026-140007"],"title":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3…","description":"minimatch is a minimal matching utility for converting glob expressions into JavaScript RegExp objects. From 11.0.3 until 11.0.8, the top-level minimatch() function stores compiled Minimatch objects in a module-level 256-entry Map whose entries are bounded by count but not by retained expansion weight below the braceExpandMax ceiling. An application that accepts unique attacker-controlled glob patterns can retain objects containing up to 100,000 expanded rows per entry, causing memory exhaustion and process termination; direct construction with new Minimatch() is not affected by this cache behavior. This issue is fixed in version 11.0.8.","status":"published","published":"2026-12-01T21:53:49Z","modified":"2026-12-05T00:00:26.616403337Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-12-05T00:04:45.535927Z"},{"id":"GHSA-hqmv-qgp3-jx75","title":"minimatch: Global pattern cache retains large expansions, enabling memory exhaustion","description":"## Summary\n\nminimatch 11.0.3 through 11.0.7 retain the 256 most recent compiled `Minimatch` objects 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-level `minimatch()` function can therefore be terminated with a few very small inputs.\n\n## Root cause\n\nCommit `52d2aecceb71dae7f1b19675e74e044eb472c1e6` changed `minimatch()` to store each compiled object in a 256-entry `Map`. 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 existing `braceExpandMax` default of 100,000.\n\nThe cache first ships in 11.0.3. Version 11.0.1 is a confirmed negative control.\n\n## Proof of concept\n\nInstall minimatch 11.0.4, save as `poc.mjs`, and run with `node --max-old-space-size=128 --expose-gc poc.mjs`:\n\n```js\nimport { minimatch } from 'minimatch'\n\nfor (let i = 0; i \u003c 4; i++) {\n  const pattern = `{1..100000}/unique-${i}`\n  minimatch('no-match', pattern, { optimizationLevel: 2 })\n  global.gc()\n  console.log(i + 1, process.memoryUsage())\n}\n```\n\nOn 11.0.4, the process terminates with:\n\n```text\nFATAL ERROR: Ineffective mark-compacts near heap limit\nAllocation failed - JavaScript heap out of memory\n```\n\nThe 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.\n\nAs 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.\n\n## Impact\n\nApplications 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.\n\nConfirmed affected: 11.0.3 through 11.0.7. No patched version is currently available.\n\n## Suggested remediation\n\nBound 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.\n\n## Duplicate review and disclosure\n\nPublic 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.\n\nOpenAI 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.","status":"published","published":"2026-12-01T18:05:29Z","modified":"2026-12-01T18:15:04.058925962Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-12-01T18:33:56.521964Z"},{"id":"UBUNTU-CVE-2026-140007","upstream":["CVE-2026-140007"],"description":"(minimatch is a minimal matching utility for converting glob expression ...)","status":"published","published":"2026-12-02T00:00:00Z","modified":"2026-12-03T20:48:20.749179397Z","updated_at":"2026-12-03T21:13:04.052985Z"}]}}
