CVE-2025-64340Medium· 6.7▾ SunlitFastMCP has a Command Injection vulnerability - Gemini CLI
▾ Sunlit zone — Low / medium · no exploitation signal
impact 36.9 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 13.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.7%
Last analysed / modified upstream
Server names containing shell metacharacters (e.g., &) can cause command injection on Windows when passed to fastmcp install claude-code or fastmcp install gemini-cli. These install paths use subprocess.run() with a list argument, but on Windows the target CLIs often resolve to .cmd wrappers that are executed through cmd.exe, which interprets metacharacters in the flattened command string.
PoC:
from fastmcp import FastMCP
mcp = FastMCP(name="test&calc")
@mcp.tool
def roll_dice(n_dice: int) -> list[int]:
"""Roll `n_dice` 6-sided dice and return the results."""
return [random.randint(1, 6) for _ in range(n_dice)]
fastmcp install claude-code server.py # or: fastmcp install gemini-cli server.py
On Windows, this opens Calculator via the &calc in the server name.
Impact:
Arbitrary command execution with the privileges of the user running fastmcp install. Affects Windows hosts where the target CLI (one of claude, gemini) is installed as a .cmd wrapper. Does not affect macOS/Linux, and does not affect config-file-based install targets (cursor, goose, mcp-json).
Patched in #3522 by validating server names to reject shell metacharacters.
fastmcp < 3.2.0Upgrade to a patched release:
fastmcp 3.2.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-27124HighFastMCP: Missing Consent Verification in OAuth Proxy Callback Facilitates Confused Deputy Vulnerabilities
CVE-2026-32871Critical· 10.0FastMCP is a Pythonic way to build MCP servers and clients
CVE-2025-62801MediumFastMCP vulnerable to windows command injection in FastMCP Cursor installer via server_name
CVE-2025-62800MediumFastMCP vulnerable to reflected XSS in client's callback page
CVE-2025-69196Medium· 6.5FastMCP is the standard framework for building MCP applications