CVE-2026-144291 — Glob — CWE-20 · CWE-693
### 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 | |
### 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 | |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-144291
CVSS 6.3/10 · MEDIUM · 03.12.2026
CWE: CWE-20, CWE-693
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
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Summary: ### 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(), butescape() only escapes { and } when magicalBraces is enabled — whichglob does not do. A root path containing braces is therefore brace-expanded
du…
Affected: glob
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N).
🌍 REAL WORLD IMPACT
All confidential data readable/stealable.
🛡️ REMEDIATION
→ Apply vendor security update for glob.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📋 Routine update cycle (30 days)
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]