{"id":"GHSA-g3hv-75wg-m249","revision":"ac5bb2a9e98b4b719d93d4b1e9bcec56","records":[{"revision":"ac5bb2a9e98b4b719d93d4b1e9bcec56","observedAt":"2026-11-04T17:56:03.39+00:00","statement":{"source":"osv","id":"GHSA-g3hv-75wg-m249","aliases":["CVE-2026-118764"],"title":"minimatch has potential denial of service via globparts amplification","description":"minimatch 10.2.6 contains an attacker-controlled pattern amplification in firstPhasePreProcess() when optimizationLevel >= 2.\n\nresearcher: Reid Downing (b1nv0id)\nfiles: \n\n- src/index.ts: 690-770\n- src/index.ts: 780-796\n\nissue:\ninput-controlled growth of globParts during first-phase preprocessing, followed by quadratic second-phase processing.\n\nthe **/../ transformation clones a globparts entry and appends the clone to the same globparts array:\n```\nparts.splice(gs, 1)\nconst other = parts.slice(0)\nother[gs] = '**'\nglobParts.push(other)\n```\nthis occurs inside a do...while (didSomething) fixpoint loop, allowing generated entries to be processed again.\n\nthe expanded globparts array is subsequently processed by secondPhasePreProcess(), which performs pairwise comparisons:\n```\nfor (let i = 0; i < globParts.length - 1; i++) {\n  for (let j = i + 1; j < globParts.length; j++) {\n    this.partsMatch(...)\n  }\n}\n```\nan attacker who can supply a glob pattern can therefore cause additional pattern entries to be generated during preprocessing, followed by quadratic pairwise processing, resulting in excessive cpu and memory consumption.","state":0,"publishedAt":"2026-10-30T23:09:55+00:00","modifiedAt":"2026-11-04T17:01:25.8501142+00:00","affected":[{"ecosystem":"npm","name":"minimatch","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"7.0.0"},{"kind":"fixed","version":"11.0.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/isaacs/minimatch/security/advisories/GHSA-g3hv-75wg-m249","https://nvd.nist.gov/vuln/detail/CVE-2026-118764","https://github.com/isaacs/minimatch/commit/297b6c1a01f2410b3ba1ebed14ba222d0c3c1033","https://github.com/isaacs/minimatch/commit/77a0f5c4b80bdc641c3c930a1d9edf5ad2db57f8","https://github.com/isaacs/minimatch/commit/fd0b3ab9cbc5bf1aff1c99f1f46e413c2b3340da","https://github.com/isaacs/minimatch","https://github.com/isaacs/minimatch/releases/tag/v11.0.1"],"sourceUrl":"https://github.com/advisories/GHSA-g3hv-75wg-m249","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-g3hv-75wg-m249","identifiers":["GHSA-g3hv-75wg-m249","CVE-2026-118764"]},"retained":false,"historicalAffected":[]}],"coverage":[]}