CVE-2026-140006
### Summary `minimatch.escape()` is documented to "Escape all magic characters in a glob pattern, so that it will only ever match literal strings." (README, section `minimatch.escape(pattern, options = {})`). In minimatch 11.0.5 (latest release; `main` is at the `v11.0.5` tag, commit `ea0a4a6`) four classes of input break that contract: 1. A leading `!` is left unescaped. `escape('!secret.txt')` returns `'!secret.txt'`, which is a negated pattern. It matches every path except `secret.txt`, for example `passwd`. This holds in POSIX mode and in `windowsPathsNoEscape` mode. 2. A leading `#` is left unescaped. `escape('#notes.md')` returns `'#notes.md'`, which is a comment pattern. It matches nothing, including `#notes.md`. This holds in both modes. 3. An escaped backslash does not survive brace expansion. For the user text `x\*` (x, backslash, star), `escape()` returns `x\\\*`. Alone, that pattern matches only the literal. When the pattern also contains a brace group, brace-expansion turns `\\` back into a single `\`, so the `*` becomes a live wildcard. The brace group can come from the caller (`escape(u) + '.{js,ts}'`) or, with default options, from the user text itself (`escape('x\\*{,}')`). 4. With `{ windowsPathsNoEscape: true, magicalBraces: true }`, `escape('x{a,b}')` returns `x[{]a,b[}]`. Brace-expansion does not know `[...]` classes and expands it to `x[]a]` and `x[b[]`. The pattern matches `xa` and does not match `x{a,b}`. The README documents negation and comments for patterns in general (README lines 484-493). The `escape()` section does not mention them, and its contract ("only ever match literal strings") is what callers rely on. The README warns that building a matcher from untrusted user patterns is unsafe. `escape()` is the documented way to make text match only as a literal (README.md:213-214), which is how callers embed untrusted text. These cases are inside that boundary. Behaviors 1 and 3 widen a match (fail open for an allowlist). Behavior 2 emp
Properties
- Severity
- medium
- Summary
- minimatch: minimatch.escape() output matches more or less than the literal input
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Epss score
- 0.00287
- Cvss severity
- MEDIUM
- Cvss score
- 5.4
- Retrieved at
- 2026-12-02T06:40:14+00:00
- Ghsa published
- 2026-12-01T18:06:47Z
- Source url
- https://github.com/advisories/GHSA-c859-jr93-m5j4
- Ghsa updated
- 2026-12-01T18:06:48Z
- Ghsa id
- GHSA-c859-jr93-m5j4
- Last source
- FIRST EPSS
- Score
- 5.4
- Cvss version
- 3.1
- Cve id
- CVE-2026-140006
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- First seen by Signal
- 2026-11-30T22:28:40+00:00
- Name
- CVE-2026-140006
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph