mcp-cve-project

CVE-2025-64340 | FastMCP (PrefectHQ/fastmcp) | High | 7.8

CVE Information

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.

CVE Breakdown


What is the vulnerability?

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.

Attack prerequisites / exposure

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.

CVE is because of what bug?

Missing validation of server names before passing them to Windows CLI install paths that ultimately run under cmd.exe.

MCP-specific impact / why it matters

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.

Where was the bug? (source + snippet)