# Pi v1.8.0 updates cross-spawn and minimatch to fix three security advisories

> Pi's v1.8.0 release updates cross-spawn to 7.1.2 and minimatch to 11.0.9 to address published GitHub security advisories.

- Status: official (From the company, authors or authority themselves, with a link to their own page.)
- Topic: Safety & Security
- Published: 2026-12-03T12:41:14+00:00
- Updated: 2026-12-03T13:10:05.269598+00:00
- Web page: https://ai-news.ikangai.com/story/pi-v1-8-0-updates-cross-spawn-and-minimatch-to-fix-three-security-advisories/
- Seen in: Pi releases
- Change: security (Security)
- Applies to: cross-spawn, minimatch, 11.0.0 through 11.0.6, Windows

## What changed

Pi v1.8.0 updates cross-spawn to 7.1.2 to fix a Windows command injection flaw in batch file launches and updates minimatch to 11.0.9 to fix three advisories about slow pattern compilation and memory growth.

Pi v1.8.0 moves two of its dependencies to patched versions. cross-spawn goes to 7.1.2 to close a command injection flaw in how batch files are launched through cmd.exe on Windows. minimatch goes to 11.0.9 to address three advisories about slow pattern compilation and memory growth. The release notes file both updates under "Updated" in the Changed section. The cross-spawn change also carries a behavior change that Windows users of MCP servers will notice.

The cross-spawn advisory, GHSA-ghv9-86vm-4v8m, is tracked as CVE-2026-137199 and rated critical with a CVSS 4.0 score of 9.2. On Windows, cross-spawn runs anything that is not a real executable, such as a .bat or .cmd file, through cmd.exe, and it escapes the command and its arguments for that shell. A batch file that forwards its arguments with %* makes cmd.exe parse them a second time. According to the advisory, cross-spawn only accounted for that second parse when the batch file was an npm cmd-shim inside node_modules/.bin. For any other batch file, including npm.cmd, globally installed package shims and user scripts, a crafted argument could break out of its quotes. The advisory's example passes the argument " & calc & " to spawn.sync('npm'), which it says runs calc.exe. Other platforms are not affected, and neither is the options.shell setting, which the advisory says does not escape by design.

The fix in 7.1.0 and 6.0.7 wraps batch file arguments in double quotes, neutralizes percent signs, runs cmd.exe with /e:on /v:off, and rejects line breaks with a TypeError. The advisory also says some limits cannot be fixed by escaping, such as batch files that use %~1 unquoted, and points readers to the README. Its workaround is to validate untrusted input and call executables directly rather than through batch files. Pi's release note describes the effect on its own users. An MCP command with embedded arguments, such as "npx -y foo", is now quoted as one command, so it fails on Windows, as it already did on Linux. The note says the fix is to put the arguments in the args field instead.

The minimatch update covers three advisories. GHSA-cf2h-pxjq-68xw, tracked as CVE-2026-140008, is rated high with a CVSS 4.0 score of 8.7. It concerns a regression introduced in 11.0.0 in the mergeRows() function. According to the advisory, that function loops over every part position in a pattern and, for each row with a wildcard, copies and joins the whole row to build a Map key. For a pattern made of many wildcard-only path parts, the work grows quadratically even with a single row, and any uncached pattern pays the cost because it runs in new Minimatch. The advisory's measurements on 11.0.6 use a pattern of * parts joined by /. 1000 parts took 22 ms, 2000 parts 72 ms, 4000 parts 190 ms and 8000 parts 805 ms. It extrapolates that a pattern at the 64 KB limit, about 32,000 parts, would block one compile for roughly 13 s. The advisory adds that a leading brace group of distinct words multiplies the rows and the cost. The affected range is 11.0.0 through 11.0.6, with 11.0.7 as the patched version.

Pi's release note lists GHSA-cf2h-pxjq-68xw, GHSA-hqmv-qgp3-jx75 and GHSA-c859-jr93-m5j4 together. It describes them as slow compiling of long wildcard patterns and memory growth from the pattern cache. The release note does not say what GHSA-hqmv-qgp3-jx75 covers, and the page for it was not among the linked material. The practical change for Pi users is a limit. Glob patterns in model selection, package filters and find on Windows that would expand to more than 100,000 patterns now fail with an error instead of hanging. The release note does not say how that limit relates to the 64 KB pattern size in the minimatch advisory, and the two limits are stated in different units.

## Why it matters

Companies using Pi on Windows or with MCP commands that include inline arguments may see configurations that previously worked now fail, and should review those settings alongside the security fixes.

## What you can do

Teams running Pi on Windows should upgrade to v1.8.0 and move inline MCP command arguments into the args field.

## Original source

- [Release v1.8.0 · earendil-works/pi · GitHub](https://github.com/earendil-works/pi/releases/tag/v1.8.0)
- [cross-spawn: Command injection on Windows when spawning batch files · CVE-2026-137199 · GitHub Advisory Database · GitHub](https://github.com/advisories/GHSA-ghv9-86vm-4v8m)
- [minimatch: Quadratic compile time for long wildcard patterns (regression in 11.0.0 `mergeRows`) · CVE-2026-140008 · GitHub Advisory Database · GitHub](https://github.com/advisories/GHSA-cf2h-pxjq-68xw)

---

AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it.

Cite as: IKANGAI AI News, "Pi v1.8.0 updates cross-spawn and minimatch to fix three security advisories", 2026-12-03, https://ai-news.ikangai.com/story/pi-v1-8-0-updates-cross-spawn-and-minimatch-to-fix-three-security-advisories/
