{"id":"CVE-2025-64340","aliases":["CLSA-2026-1781139162","CLSA-2026-1789551772","EUVD-2025-209207","GHSA-m8x7-r2rg-vh5g","PYSEC-2026-2475","ROOT-APP-PYPI-CVE-2025-64340"],"status":"published","title":"FastMCP has a Command Injection vulnerability - Gemini CLI","description":"FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, server names containing shell metacharacters (e.g., \u0026) 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. This issue has been patched in version 3.2.0.","severity":{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00748,"percentile":0.55385,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-78"],"published":"2026-03-31T22:24:15Z","modified":"2026-10-28T02:30:48Z","fixes":[{"ecosystem":"PyPI","package":"fastmcp","fixed_in":["3.2.0"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:PyPI","package":"fastmcp","fixed_in":["2.14.7.post2+tuxcare"],"sources":["osv"]},{"ecosystem":"Root:PyPI","package":"rootio-fastmcp","fixed_in":["2.12.4+root.io.3","2.12.4+root.io.4","2.12.4+root.io.5"],"sources":["osv"]},{"ecosystem":"Root:PyPI","package":"fastmcp","fixed_in":["2.12.4+aikido.5"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.2.0"}]}]},{"source":"osv","ecosystem":"TuxCare:PyPI","package":"fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.14.7"},{"fixed":"2.14.7.post2+tuxcare"}]}],"versions":["2.14.7","2.14.7.post1+tuxcare"]},{"source":"osv","ecosystem":"TuxCare:PyPI","package":"fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.14.5"},{"fixed":"2.14.5.post3+tuxcare"}]}],"versions":["2.14.5","2.14.5.post1+tuxcare","2.14.5.post2+tuxcare"],"bundled":2},{"source":"osv","ecosystem":"PyPI","package":"fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.2.0"}]}],"versions":["0.1.0","0.2.0","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.4.0","0.4.1","1.0","2.0.0","2.1.0","2.1.1","2.1.2","2.10.0","2.10.1","2.10.2","2.10.3","2.10.4","2.10.5","2.10.6","2.11.0","2.11.1","2.11.2","2.11.3","2.12.0","2.12.0rc1","2.12.1","2.12.2","2.12.3","2.12.4","2.12.5","2.13.0","2.13.0.1","2.13.0.2","2.13.0rc1","2.13.0rc2","2.13.0rc3","2.13.1","2.13.2","2.13.3","2.14.0","2.14.1","2.14.2","2.14.3","2.14.4","2.14.5","2.14.6","2.14.7","2.2.0","2.2.1","2.2.10","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.2.7","2.2.8","2.2.9","2.3.0","2.3.0rc1","2.3.1","2.3.2","2.3.3","2.3.4","2.3.5","2.4.0","2.5.0","2.5.1","2.5.2","2.6.0","2.6.1","2.7.0","2.7.1","2.8.0","2.8.1","2.9.0","2.9.1","2.9.2","3.0.0","3.0.0b1","3.0.0b2","3.0.0rc1","3.0.0rc2","3.0.0rc3","3.0.1","3.0.2","3.1.0","3.1.1"]},{"source":"osv","ecosystem":"PyPI","package":"fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.2.0"}]}],"versions":["0.1.0","0.2.0","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.4.0","0.4.1","1.0","2.0.0","2.1.0","2.1.1","2.1.2","2.10.0","2.10.1","2.10.2","2.10.3","2.10.4","2.10.5","2.10.6","2.11.0","2.11.1","2.11.2","2.11.3","2.12.0","2.12.0rc1","2.12.1","2.12.2","2.12.3","2.12.4","2.12.5","2.13.0","2.13.0.1","2.13.0.2","2.13.0rc1","2.13.0rc2","2.13.0rc3","2.13.1","2.13.2","2.13.3","2.14.0","2.14.1","2.14.2","2.14.3","2.14.4","2.14.5","2.14.6","2.14.7","2.2.0","2.2.1","2.2.10","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.2.7","2.2.8","2.2.9","2.3.0","2.3.0rc1","2.3.1","2.3.2","2.3.3","2.3.4","2.3.5","2.4.0","2.5.0","2.5.1","2.5.2","2.6.0","2.6.1","2.7.0","2.7.1","2.8.0","2.8.1","2.9.0","2.9.1","2.9.2","3.0.0","3.0.0b1","3.0.0b2","3.0.0rc1","3.0.0rc2","3.0.0rc3","3.0.1","3.0.2","3.1.0","3.1.1"]},{"source":"osv","ecosystem":"Root:PyPI","package":"rootio-fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.4+root.io.3"},{"fixed":"2.12.4+root.io.4"},{"fixed":"2.12.4+root.io.5"}]}]},{"source":"osv","ecosystem":"Root:PyPI","package":"fastmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.4+aikido.5"}]}]}],"products":[{"vendor":"jlowin","product":"fastmcp"}],"references":[{"url":"https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-m8x7-r2rg-vh5g","tags":["x_refsource_CONFIRM","exploit","Exploit","Patch","Vendor Advisory","advisory","web"]},{"url":"https://github.com/PrefectHQ/fastmcp/pull/3522","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/jlowin/fastmcp/security/advisories/GHSA-m8x7-r2rg-vh5g","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64340","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-m8x7-r2rg-vh5g","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64340.json","tags":["advisory"]},{"url":"https://github.com/PrefectHQ/fastmcp","tags":["package"]},{"url":"https://pypi.org/project/fastmcp","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-64340","title":"FastMCP has a Command Injection vulnerability - Gemini CLI","description":"FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, server names containing shell metacharacters (e.g., \u0026) 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. This issue has been patched in version 3.2.0.","status":"published","published":"2026-04-03T15:16:13.93Z","modified":"2026-04-03T16:12:58.401Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:32:47.08757Z"}],"euvd":[{"id":"EUVD-2025-209207","description":"FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, server names containing shell metacharacters (e.g., \u0026) 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. This issue has been patched in version 3.2.0.","status":"published","published":"2026-04-03T15:16:13Z","modified":"2026-04-03T16:12:58Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T19:25:16.92155Z"}],"ghsa":[{"id":"GHSA-m8x7-r2rg-vh5g","title":"FastMCP has a Command Injection vulnerability - Gemini CLI","description":"Server names containing shell metacharacters (e.g., `\u0026`) 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.\n\nPoC:\n```python\nfrom fastmcp import FastMCP\n\nmcp = FastMCP(name=\"test\u0026calc\")\n\n@mcp.tool\ndef roll_dice(n_dice: int) -\u003e list[int]:\n    \"\"\"Roll `n_dice` 6-sided dice and return the results.\"\"\"\n    return [random.randint(1, 6) for _ in range(n_dice)]\n```\n\n```\nfastmcp install claude-code server.py   # or: fastmcp install gemini-cli server.py\n```\n\nOn Windows, this opens Calculator via the `\u0026calc` in the server name.\n\nImpact:\nArbitrary 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).\n\nPatched in #3522 by validating server names to reject shell metacharacters.","status":"published","published":"2026-03-31T22:24:15Z","modified":"2026-04-06T17:37:33Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:39:48.966685Z"}],"nvd":[{"id":"CVE-2025-64340","description":"FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, server names containing shell metacharacters (e.g., \u0026) 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. This issue has been patched in version 3.2.0.","status":"published","published":"2026-04-03T16:16:23.01Z","modified":"2026-07-24T21:10:00.143Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:12:01.641503Z"}],"osv":[{"id":"CVE-2025-64340","title":"FastMCP has a Command Injection vulnerability - Gemini CLI","description":"FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, server names containing shell metacharacters (e.g., \u0026) 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. This issue has been patched in version 3.2.0.","status":"published","published":"2026-04-03T15:16:13.93Z","modified":"2026-10-28T02:30:48.415411101Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:44:51.851511Z"},{"id":"GHSA-m8x7-r2rg-vh5g","title":"FastMCP has a Command Injection vulnerability - Gemini CLI","description":"Server names containing shell metacharacters (e.g., `\u0026`) 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.\n\nPoC:\n```python\nfrom fastmcp import FastMCP\n\nmcp = FastMCP(name=\"test\u0026calc\")\n\n@mcp.tool\ndef roll_dice(n_dice: int) -\u003e list[int]:\n    \"\"\"Roll `n_dice` 6-sided dice and return the results.\"\"\"\n    return [random.randint(1, 6) for _ in range(n_dice)]\n```\n\n```\nfastmcp install claude-code server.py   # or: fastmcp install gemini-cli server.py\n```\n\nOn Windows, this opens Calculator via the `\u0026calc` in the server name.\n\nImpact:\nArbitrary 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).\n\nPatched in #3522 by validating server names to reject shell metacharacters.","status":"published","published":"2026-03-31T22:24:15Z","modified":"2026-09-10T03:51:00.538174997Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:46:51.463834Z"},{"id":"PYSEC-2026-2475","title":"FastMCP has a Command Injection vulnerability - Gemini CLI","description":"Server names containing shell metacharacters (e.g., `\u0026`) 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.\n\nPoC:\n```python\nfrom fastmcp import FastMCP\n\nmcp = FastMCP(name=\"test\u0026calc\")\n\n@mcp.tool\ndef roll_dice(n_dice: int) -\u003e list[int]:\n    \"\"\"Roll `n_dice` 6-sided dice and return the results.\"\"\"\n    return [random.randint(1, 6) for _ in range(n_dice)]\n```\n\n```\nfastmcp install claude-code server.py   # or: fastmcp install gemini-cli server.py\n```\n\nOn Windows, this opens Calculator via the `\u0026calc` in the server name.\n\nImpact:\nArbitrary 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).\n\nPatched in #3522 by validating server names to reject shell metacharacters.","status":"published","published":"2026-07-13T14:36:46.084219Z","modified":"2026-07-13T16:31:55.161769253Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:52:55.961245Z"},{"id":"ROOT-APP-PYPI-CVE-2025-64340","title":"CVE-2025-64340 in rootio-fastmcp - Patched by Root","description":"Root has patched CVE-2025-64340 in the rootio-fastmcp package for Root:PyPI. Multiple fixed versions available.","status":"published","published":"2026-06-03T14:52:53Z","modified":"2026-06-03T19:30:13.802993248Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:27.940619Z"},{"id":"CLSA-2026-1781139162","title":"TuxCare security update for fastmcp (1 CVE)","description":"TuxCare rebuilt fastmcp to address 1 CVE. Fixed in 2.14.7.post2+tuxcare.","status":"published","published":"2026-08-04T14:52:36Z","modified":"2026-10-15T09:48:00.948723014Z","updated_at":"2026-11-02T15:43:45.445699Z"},{"id":"CLSA-2026-1789551772","title":"TuxCare security update for fastmcp (2 CVEs)","description":"TuxCare rebuilt fastmcp to address 2 CVEs. Fixed in 2.14.5.post3+tuxcare.","status":"published","published":"2026-09-16T09:42:52Z","modified":"2026-10-15T09:48:01.819031834Z","updated_at":"2026-11-02T15:43:47.938828Z"}]}}
