Skip to content
Heist/ feed
Back to feed
Medium

FastMCP has a Command Injection vulnerability - Gemini CLI

Type: advisorySources: OSV

FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, 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. This issue has been patched in version 3.2.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-64340
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 00:45 UTC · Revision 1

Source evidence

FastMCP has a Command Injection vulnerability - Gemini CLI

core-osv · Original source

Published 3 Apr 2026, 15:16 UTC

FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, 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. This issue has been patched in version 3.2.0.

osv:CVE-2025-64340
Complete source record
{
  "id": "913c1aeab49acea2e210d30da7679268926ff3af69bd2be53b76355e79ed68c3",
  "url": "https://osv.dev/vulnerability/CVE-2025-64340",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "FastMCP has a Command Injection vulnerability - Gemini CLI",
    "summary": "FastMCP is the standard framework for building MCP applications. Prior to version 3.2.0, 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. This issue has been patched in version 3.2.0.",
    "evidence": "osv:CVE-2025-64340",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-64340",
      "aliases": [
        "CVE-2025-64340",
        "GHSA-m8x7-r2rg-vh5g",
        "PYSEC-2026-2475"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/prefecthq/fastmcp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "665514e19a78543709be85b4261153bbe98e882f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.2.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:jlowin:fastmcp:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.2.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.1.0",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v3.0.0rc3",
            "v3.0.0rc2",
            "v3.0.0rc1",
            "v3.0.0b2",
            "v3.0.0b1",
            "v2.14.1",
            "v2.14.0",
            "v2.13.2",
            "v2.13.1",
            "v2.13.0.1",
            "v2.13.0",
            "v2.13.0rc3",
            "v2.13.0rc2",
            "v2.13.0rc1",
            "v2.12.4",
            "v2.12.3",
            "v2.12.2",
            "v2.12.1",
            "v2.12.0rc1",
            "v2.12.0",
            "v2.11.3",
            "v2.11.2",
            "v2.11.1",
            "v2.11.0",
            "v2.10.6",
            "v2.10.5",
            "v2.10.4",
            "v2.10.3",
            "v2.10.2",
            "v2.10.1",
            "v2.10.0",
            "v2.9.2",
            "v2.9.1",
            "v2.9.0",
            "v2.8.1",
            "v2.8.0",
            "v2.7.1",
            "v2.7.0",
            "v2.6.1",
            "v2.6.0",
            "v2.5.2",
            "v2.5.1",
            "v2.5.0",
            "v2.4.0",
            "v2.3.5",
            "v2.3.4",
            "v2.3.3",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.3.0-rc.2",
            "v2.3.0-rc.1",
            "v2.2.10",
            "v2.2.9",
            "v2.2.8",
            "v2.2.7",
            "v2.2.6",
            "v2.2.5",
            "v2.2.3",
            "v2.2.4",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.0",
            "v1.0",
            "v0.4.1",
            "v0.4.0",
            "v0.3.5",
            "v0.3.4",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.0",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-64340.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.415411101Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64340.json",
        "https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-m8x7-r2rg-vh5g",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-64340",
        "https://github.com/PrefectHQ/fastmcp/pull/3522"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-78"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64340.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-64340",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 516720,
  "published_at": "2026-04-03T15:16:13.93+00:00"
}