CVE-2026-144291: Glob Absolute `ignore` Pattern Silently Bypassed Vulnerability

MODERATE
Advisory Identifier: GHSA-c6wh-w8c3-cv3g
CWE-693 CWE-20
Published
Advisory Summary

CVE-2026-144291 is a MODERATE absolute `ignore` pattern silently bypassed vulnerability (CWE-693: Protection Mechanism Failure) affecting Glob libraries in the npm ecosystem. The issue involves absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces. Remediation is available by upgrading affected packages to version 14.0.6.

CVE-2026-144291 at a Glance

CVE Identifier CVE-2026-144291
GHSA Identifier GHSA-c6wh-w8c3-cv3g
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product Glob
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-144291

To remediate this vulnerability, upgrade all affected Glob dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

glob fixed: 14.0.6
npm install glob@14.0.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls glob

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-144291, inspect your project dependencies using npm:

npm ls glob

Analyze the terminal output to locate any version of Glob in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.0.6), your application is affected.

Note: The npm ls glob command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Glob, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `glob`'s `ignore` option composes an absolute ignore pattern by pasting the resolved `root`/`cwd` path into a glob *string*, then re-parsing that string with `minimatch`. The path is escaped with `minimatch`'s `escape()`, but `escape()` only escapes `{` and `}` when `magicalBraces` is enabled — which `glob` does not do. A root path containing braces is therefore brace-expanded during re-parsing, and the resulting ignore pattern no longer matches the real path. The exclusion is silently dropped and the excluded file is returned. ### Root cause `src/ignore.ts:84-88` ```ts const slashRoot = cwd?.resolve(root ?? '/').fullpath() ?? '/' this.slashRoot = escape( slashRoot.replace(/\\/g, '/').replace(/\/$/, ''), { windowsPathsNoEscape }, // <-- no `magicalBraces` ) ``` `src/ignore.ts:121-125` ```ts const glob = p.root() === '/' ? `${this.slashRoot}/${p.rest()?.globString() ?? ''}` : p.globString() const m = new Minimatch(glob, this.mmopts) // <-- brace expansion happens here ``` The composed string is parsed as a glob, so `{7,8}` becomes two alternatives. ### Why this is a vulnerability and not a cosmetic issue The `root` option exists precisely so that absolute patterns and absolute ignore rules are anchored at a chosen directory. The two code paths handle `root` differently: | path | `root` handling | braces in root | |---|---|---| | pattern (`src/processor.ts`) | `t.resolve(this.opts.root)` — **path resolution** | works correctly | | ignore (`src/ignore.ts`) | pasted into a **glob string** | silently broken | So the *pattern* still finds the file at the literal path, while the *ignore* rule that was supposed to exclude it stops matching. The caller asked for `ignore: ['/skip.log']` anchored at `root` and did not get it. ### Impact `ignore` is routinely used to exclude secrets, credentials, lockfiles, build artifacts, or tenant-scoped paths. When the rule is dropped, those files are returned to the caller instead. The trigger is the *path*, not the ignore pattern, so it is reachable when the root/cwd path is derived from externally supplied data (tenant id, project name, upload directory, archive extraction path). ### Reproduction ```js import { Volume, createFsFromVolume } from 'memfs' import { glob } from 'glob' const vol = new Volume() const fs = createFsFromVolume(vol) vol.fromJSON({ '/root{7,8}/keep.txt': 'x', '/root{7,8}/skip.log': 'x', }) const res = await glob('*', { cwd: '/root{7,8}', root: '/root{7,8}', fs, ignore: ['/skip.log'], platform: 'posix', }) console.log(res) // [ 'keep.txt', 'skip.log' ] <-- skip.log should be ignored ``` Control with a plain root path: ```js vol.fromJSON({ '/root/keep.txt': 'x', '/root/skip.log': 'x' }) await glob('*', { cwd: '/root', root: '/root', fs, ignore: ['/skip.log'], platform: 'posix', }) // [ 'keep.txt' ] <-- ignore correctly enforced ``` ### Mechanism proof ```js const { Ignore } = await import('glob') const { PathScurryPosix } = await import('path-scurry') const ig = new Ignore(['/skip.log'], { platform: 'posix', root: '/root{7,8}' }, scurry.cwd) ig.slashRoot // "/root{7,8}" ig.absolute[0].set // [['', 'root7', 'skip.log'], ['', 'root8', 'skip.log']] ig.absolute[0].match('/root{7,8}/skip.log') // false <-- the real path ig.absolute[0].match('/root7/skip.log') // true <-- a path that does not exist ``` ## Fix Both issues are in `src/ignore.ts`. A minimal change closes them: ```diff this.mmopts = { + braceExpandMax: 10_000, dot: true, nobrace, nocase, @@ this.slashRoot = escape( slashRoot.replace(/\\/g, '/').replace(/\/$/, ''), - { windowsPathsNoEscape }, + { magicalBraces: true, windowsPathsNoEscape }, ) ``` - `magicalBraces: true` makes `escape()` escape `{` and `}` as well, so the composed path stays literal and is not brace-expanded on re-parse. - `braceExpandMax: 10_000` makes the ignore path use the same limit as the pattern path. Verified: with this patch the ignore matcher becomes `[['', 'root{7,8}', 'skip.log']]` (one row, literal), matches `/root{7,8}/skip.log`, and the amplified ignore payload is rejected with the same error as the pattern path. Regression tests are in `test/ignore-braces.ts`; they fail against the unpatched source and pass with the patch. The existing suite (`test/ignore.ts`, `test/custom-ignore.ts`, `test/ignore-root.ts`, `test/pattern.ts`, `test/root.ts`, `test/absolute.ts`) remains green: 167/167. Tested on published `glob@14.0.4` (current HEAD f26bdac). Earlier versions not checked. Fixed in: 14.0.6 ### Related hardening (same file) `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.

CVE-2026-144291 Affected Glob Versions

1 component(s)
Fixed Versions:
14.0.6
Product / Package Ecosystem Affected Versions Fixed Version
glob
npm
< 14.0.6
14.0.6

References

Frequently Asked Questions

What is CVE-2026-144291?
CVE-2026-144291 is a security vulnerability in Glob involving Absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces under CWE-693: Protection Mechanism Failure.
Which Glob versions are affected?
Affected versions include releases prior to 14.0.6 across affected packages: glob.
What version fixes CVE-2026-144291?
Upgrading to 14.0.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is glob affected?
Yes, glob is affected in releases prior to 14.0.6. Upgrade your dependency to 14.0.6 or later.
What CWE is associated with CVE-2026-144291?
CVE-2026-144291 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check npm dependencies for CVE-2026-144291?
Run the dependency tree command: 'npm ls glob'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c6wh-w8c3-cv3g",
  "modified" : "2026-12-04T21:47:55Z",
  "published" : "2026-12-04T21:47:55Z",
  "aliases" : [ "CVE-2026-144291" ],
  "summary" : "Glob: Absolute `ignore` pattern silently bypassed when `root`/`cwd` path contains braces",
  "details" : "### 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 },        // <-- 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)   // <-- 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' ]  <-- 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' ]  <-- 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  <-- the real path\nig.absolute[0].match('/root7/skip.log')      // true   <-- 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "glob"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.0.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 14.0.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/isaacs/node-glob/security/advisories/GHSA-c6wh-w8c3-cv3g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-144291"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/isaacs/node-glob/commit/17cb20749bc65a64ec44d40de2736cc587564866"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/isaacs/node-glob"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/isaacs/node-glob/releases/tag/v14.0.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-693" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-04T21:47:55Z",
    "nvd_published_at" : "2026-12-03T17:18:11Z"
  }
}