{"id":"CVE-2026-144291","aliases":["DEBIAN-CVE-2026-144291","EUVD-2026-143500","GHSA-c6wh-w8c3-cv3g"],"status":"published","title":"Glob: Absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces","description":"Glob matches files using patterns the shell uses. Prior to 14.0.6, the glob ignore option composes absolute ignore patterns by inserting an escaped root/cwd path into a new glob string in src/ignore.ts, but the escape operation does not preserve braces as literal characters. When an affected application uses an absolute ignore rule and processes a brace-containing root/cwd path, the path is brace-expanded during re-parsing, the ignore matcher no longer matches the real literal path, and files intended to be excluded can be returned to the caller. This issue is fixed in version 14.0.6.","severity":{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium","assessor":"cna","from":"cve","others":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","from":"osv"}]},"epss":{"day":"2026-12-04","score":0.00904,"percentile":0.61013,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true,"poc_reported":true},"cwes":["CWE-20","CWE-693"],"published":"2026-12-03T17:10:33Z","modified":"2026-12-04T21:47:58Z","fixes":[{"ecosystem":"npm","package":"glob","fixed_in":["14.0.6"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"glob","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"14.0.5"},{"fixed":"14.0.6"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"node-glob","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.2.7+~cs0.4.15-1","10.3.6+~cs0.4.15-1","10.3.6+~cs0.4.15-2","10.3.6+~cs0.4.15-3","10.3.6+~cs0.4.15-4","10.3.6+~cs0.4.15-5","10.3.6+~cs0.4.15-6","10.3.6+~cs0.4.15-7","10.3.6+~cs0.4.15-8","10.3.6+~cs0.4.15-9","13.0.6+~cs0.4.15-1","13.0.6+~cs0.4.15-2","8.0.3+~cs8.4.15-1","8.0.3+~cs8.4.15-2","8.0.3+~cs8.4.15-3","8.0.3+~cs8.4.15-4","8.1.0+~cs8.5.15-1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-glob","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.2.7+~cs0.4.15-1","10.3.6+~cs0.4.15-1","10.3.6+~cs0.4.15-2","10.3.6+~cs0.4.15-3","10.3.6+~cs0.4.15-4","10.3.6+~cs0.4.15-5","10.3.6+~cs0.4.15-6","10.3.6+~cs0.4.15-7","10.3.6+~cs0.4.15-8","10.3.6+~cs0.4.15-9","13.0.6+~cs0.4.15-1","13.0.6+~cs0.4.15-2","8.1.0+~cs8.5.15-1"]},{"source":"osv","ecosystem":"Debian:14","package":"node-glob","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.2.7+~cs0.4.15-1","10.3.6+~cs0.4.15-1","10.3.6+~cs0.4.15-2","10.3.6+~cs0.4.15-3","10.3.6+~cs0.4.15-4","10.3.6+~cs0.4.15-5","10.3.6+~cs0.4.15-6","10.3.6+~cs0.4.15-7","10.3.6+~cs0.4.15-8","10.3.6+~cs0.4.15-9","13.0.6+~cs0.4.15-1","13.0.6+~cs0.4.15-2","8.1.0+~cs8.5.15-1"]}],"products":[{"vendor":"isaacs","product":"node-glob"}],"references":[{"url":"https://github.com/isaacs/node-glob/security/advisories/GHSA-c6wh-w8c3-cv3g","tags":["x_refsource_CONFIRM","exploit","advisory"]},{"url":"https://github.com/isaacs/node-glob/commit/17cb20749bc65a64ec44d40de2736cc587564866","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/isaacs/node-glob/releases/tag/v14.0.6","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-144291","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-c6wh-w8c3-cv3g"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/144xxx/CVE-2026-144291.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-144291","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-144291","title":"Glob: Absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces","description":"Glob matches files using patterns the shell uses. Prior to 14.0.6, the glob ignore option composes absolute ignore patterns by inserting an escaped root/cwd path into a new glob string in src/ignore.ts, but the escape operation does not preserve braces as literal characters. When an affected application uses an absolute ignore rule and processes a brace-containing root/cwd path, the path is brace-expanded during re-parsing, the ignore matcher no longer matches the real literal path, and files intended to be excluded can be returned to the caller. This issue is fixed in version 14.0.6.","status":"published","published":"2026-12-03T17:10:33.82Z","modified":"2026-12-03T20:01:47.659Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium","assessor":"cna"}],"cwes":["CWE-20","CWE-693"],"ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T20:21:05.972773Z"}],"euvd":[{"id":"EUVD-2026-143500","description":"Glob matches files using patterns the shell uses. Prior to 14.0.6, the glob ignore option composes absolute ignore patterns by inserting an escaped root/cwd path into a new glob string in src/ignore.ts, but the escape operation does not preserve braces as literal characters. When an affected application uses an absolute ignore rule and processes a brace-containing root/cwd path, the path is brace-expanded during re-parsing, the ignore matcher no longer matches the real literal path, and files intended to be excluded can be returned to the caller. This issue is fixed in version 14.0.6.","status":"published","published":"2026-12-03T17:10:33Z","modified":"2026-12-03T20:01:47Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"updated_at":"2026-12-03T18:33:37.162921Z"}],"ghsa":[{"id":"GHSA-c6wh-w8c3-cv3g","title":"Glob: Absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces","description":"### Summary\n\n`glob`'s `ignore` option composes an absolute ignore pattern by pasting the\nresolved `root`/`cwd` path into a glob *string*, then re-parsing that string\nwith `minimatch`. The path is escaped with `minimatch`'s `escape()`, but\n`escape()` only escapes `{` and `}` when `magicalBraces` is enabled — which\n`glob` does not do. A root path containing braces is therefore brace-expanded\nduring re-parsing, and the resulting ignore pattern no longer matches the real\npath. The exclusion is silently dropped and the excluded file is returned.\n\n### Root cause\n\n`src/ignore.ts:84-88`\n\n```ts\nconst slashRoot = cwd?.resolve(root ?? '/').fullpath() ?? '/'\nthis.slashRoot = escape(\n  slashRoot.replace(/\\\\/g, '/').replace(/\\/$/, ''),\n  { windowsPathsNoEscape },        // \u003c-- no `magicalBraces`\n)\n```\n\n`src/ignore.ts:121-125`\n\n```ts\nconst glob =\n  p.root() === '/' ?\n    `${this.slashRoot}/${p.rest()?.globString() ?? ''}`\n  : p.globString()\nconst m = new Minimatch(glob, this.mmopts)   // \u003c-- brace expansion happens here\n```\n\nThe composed string is parsed as a glob, so `{7,8}` becomes two alternatives.\n\n### Why this is a vulnerability and not a cosmetic issue\n\nThe `root` option exists precisely so that absolute patterns and absolute\nignore rules are anchored at a chosen directory. The two code paths handle\n`root` differently:\n\n| path | `root` handling | braces in root |\n|---|---|---|\n| pattern (`src/processor.ts`) | `t.resolve(this.opts.root)` — **path resolution** | works correctly |\n| ignore (`src/ignore.ts`) | pasted into a **glob string** | silently broken |\n\nSo the *pattern* still finds the file at the literal path, while the *ignore*\nrule that was supposed to exclude it stops matching. The caller asked for\n`ignore: ['/skip.log']` anchored at `root` and did not get it.\n\n### Impact\n\n`ignore` is routinely used to exclude secrets, credentials, lockfiles, build\nartifacts, or tenant-scoped paths. When the rule is dropped, those files are\nreturned to the caller instead.\n\nThe trigger is the *path*, not the ignore pattern, so it is reachable when the\nroot/cwd path is derived from externally supplied data (tenant id, project\nname, upload directory, archive extraction path).\n\n### Reproduction\n\n```js\nimport { Volume, createFsFromVolume } from 'memfs'\nimport { glob } from 'glob'\n\nconst vol = new Volume()\nconst fs = createFsFromVolume(vol)\nvol.fromJSON({\n  '/root{7,8}/keep.txt': 'x',\n  '/root{7,8}/skip.log': 'x',\n})\n\nconst res = await glob('*', {\n  cwd: '/root{7,8}',\n  root: '/root{7,8}',\n  fs,\n  ignore: ['/skip.log'],\n  platform: 'posix',\n})\n\nconsole.log(res)   // [ 'keep.txt', 'skip.log' ]  \u003c-- skip.log should be ignored\n```\n\nControl with a plain root path:\n\n```js\nvol.fromJSON({ '/root/keep.txt': 'x', '/root/skip.log': 'x' })\nawait glob('*', {\n  cwd: '/root', root: '/root', fs, ignore: ['/skip.log'], platform: 'posix',\n})\n// [ 'keep.txt' ]  \u003c-- ignore correctly enforced\n```\n\n### Mechanism proof\n\n```js\nconst { Ignore } = await import('glob')\nconst { PathScurryPosix } = await import('path-scurry')\n\nconst ig = new Ignore(['/skip.log'], { platform: 'posix', root: '/root{7,8}' }, scurry.cwd)\nig.slashRoot                    // \"/root{7,8}\"\nig.absolute[0].set              // [['', 'root7', 'skip.log'], ['', 'root8', 'skip.log']]\nig.absolute[0].match('/root{7,8}/skip.log')  // false  \u003c-- the real path\nig.absolute[0].match('/root7/skip.log')      // true   \u003c-- a path that does not exist\n```\n\n## Fix\n\nBoth issues are in `src/ignore.ts`. A minimal change closes them:\n\n```diff\n     this.mmopts = {\n+      braceExpandMax: 10_000,\n       dot: true,\n       nobrace,\n       nocase,\n@@\n     this.slashRoot = escape(\n       slashRoot.replace(/\\\\/g, '/').replace(/\\/$/, ''),\n-      { windowsPathsNoEscape },\n+      { magicalBraces: true, windowsPathsNoEscape },\n     )\n```\n\n- `magicalBraces: true` makes `escape()` escape `{` and `}` as well, so the\n  composed path stays literal and is not brace-expanded on re-parse.\n- `braceExpandMax: 10_000` makes the ignore path use the same limit as the\n  pattern path.\n\nVerified: with this patch the ignore matcher becomes\n`[['', 'root{7,8}', 'skip.log']]` (one row, literal), matches\n`/root{7,8}/skip.log`, and the amplified ignore payload is rejected with the\nsame error as the pattern path.\n\nRegression tests are in `test/ignore-braces.ts`; they fail against the\nunpatched source and pass with the patch. The existing suite\n(`test/ignore.ts`, `test/custom-ignore.ts`, `test/ignore-root.ts`,\n`test/pattern.ts`, `test/root.ts`, `test/absolute.ts`) remains green: 167/167.\n\nTested on published `glob@14.0.4` (current HEAD f26bdac). Earlier versions not checked. Fixed in: 14.0.6\n\n### Related hardening (same file)\n`src/ignore.ts:71-83` builds `mmopts` without `braceExpandMax`, while the pattern path sets `braceExpandMax: 10_000` (`src/glob.ts:528`). Ignore patterns therefore fall back to minimatch's 100_000 default. The patch above already includes this one-line change.","status":"published","published":"2026-12-04T21:47:55Z","modified":"2026-12-04T21:47:58Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-20","CWE-693"],"updated_at":"2026-12-04T21:59:20.06816Z"}],"nvd":[{"id":"CVE-2026-144291","description":"Glob matches files using patterns the shell uses. Prior to 14.0.6, the glob ignore option composes absolute ignore patterns by inserting an escaped root/cwd path into a new glob string in src/ignore.ts, but the escape operation does not preserve braces as literal characters. When an affected application uses an absolute ignore rule and processes a brace-containing root/cwd path, the path is brace-expanded during re-parsing, the ignore matcher no longer matches the real literal path, and files intended to be excluded can be returned to the caller. This issue is fixed in version 14.0.6.","status":"published","published":"2026-12-03T17:18:11.64Z","modified":"2026-12-03T21:18:09.103Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"}],"cwes":["CWE-20","CWE-693"],"ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T21:23:58.882957Z"}],"osv":[{"id":"CVE-2026-144291","title":"Glob: Absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces","description":"Glob matches files using patterns the shell uses. Prior to 14.0.6, the glob ignore option composes absolute ignore patterns by inserting an escaped root/cwd path into a new glob string in src/ignore.ts, but the escape operation does not preserve braces as literal characters. When an affected application uses an absolute ignore rule and processes a brace-containing root/cwd path, the path is brace-expanded during re-parsing, the ignore matcher no longer matches the real literal path, and files intended to be excluded can be returned to the caller. This issue is fixed in version 14.0.6.","status":"published","published":"2026-12-03T17:10:33.82Z","modified":"2026-12-04T21:02:47.119992969Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-20","CWE-693"],"updated_at":"2026-12-04T21:27:50.529822Z"},{"id":"DEBIAN-CVE-2026-144291","upstream":["CVE-2026-144291"],"description":"Glob matches files using patterns the shell uses. Prior to 14.0.6, the glob ignore option composes absolute ignore patterns by inserting an escaped root/cwd path into a new glob string in src/ignore.ts, but the escape operation does not preserve braces as literal characters. When an affected application uses an absolute ignore rule and processes a brace-containing root/cwd path, the path is brace-expanded during re-parsing, the ignore matcher no longer matches the real literal path, and files intended to be excluded can be returned to the caller. This issue is fixed in version 14.0.6.","status":"published","published":"2026-12-03T17:18:11.64Z","modified":"2026-12-04T05:00:10.173537799Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"}],"updated_at":"2026-12-04T05:28:35.416179Z"}]}}
