PrefectHQ/fastmcp) | High | 7.8| Field | Value |
|---|---|
| CVE / NVD | CVE-2025-64340 |
| EPSS score | 0.000090000 (FIRST EPSS, 2026-05-29) |
| Date (index) | 2026-04-03 |
| Affected product (index) | FastMCP (fastmcp on PyPI): Windows fastmcp install command injection |
| GHSA ID | GHSA-m8x7-r2rg-vh5g |
| OWASP MCP Top 10 (2025) | MCP05 — Command Injection & Execution |
| Published / disclosed | 2026-04-03 |
| Ecosystem | PyPI |
| Component | FastMCP CLI (fastmcp install claude-code, fastmcp install gemini-cli) |
| CVSS score | 7.8 (v3.1, NVD) / 6.7 (v3.1, GitHub CNA) |
| CWE | CWE-78 |
| Affected versions | < 3.2.0 |
| Fixed versions | 3.2.0 |
| Fix status | Patched |
| Exploit status | Public advisory |
| Notes | Windows-only: .cmd wrappers invoked via cmd.exe interpret metacharacters in server names. |
FastMCP prior to version 3.2.0 allows OS command injection on Windows when a server name containing shell metacharacters (for example &) is passed to fastmcp install claude-code or fastmcp install gemini-cli. Although subprocess.run() is called with a list argument, Windows often resolves target CLIs to .cmd batch wrappers executed through cmd.exe, which flattens the command and interprets metacharacters.
Requires a Windows host with affected FastMCP and a victim or pipeline running fastmcp install with an attacker-influenced server name. Does not affect macOS/Linux per advisory; config-file install targets (cursor, goose, mcp-json) are not affected.
Missing validation of server names before passing them to Windows CLI install paths that ultimately run under cmd.exe.
FastMCP is widely used to scaffold and register MCP servers in IDE/agent configs. Command injection at install time can achieve local RCE in the developer context before any MCP transport hardening applies.
Reject server names containing shell metacharacters before invoking fastmcp install on Windows CLI targets.
Upgrade to FastMCP 3.2.0 or later. Do not pass untrusted strings as FastMCP server names on Windows.
3.2.0+ as primary remediation.fastmcp install and sanitize server names on Windows CI runners.Public advisory describes metacharacter injection via server name; do not host weaponized payloads in this repository.
fastmcp package versions < 3.2.0 in Python environments and CI images.fastmcp install scripts using dynamic server names.
https://github.com/PrefectHQ/fastmcp/pull/3522