{"answers":{"affected":"3 open source packages ship an affected version, including fastmcp. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64340 exists.","fix":"Upgrade fastmcp to 3.2.0 or later.","what":"CVE-2025-64340 is a medium-severity command injection vulnerability in jlowin fastmcp, published on 3 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-64340 and fix it if it is affected.\n\nWhat it is: CVE-2025-64340 is a medium-severity command injection vulnerability in jlowin fastmcp, published on 3 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64340 exists.\n\nAffected packages and fixed versions:\n- fastmcp (PyPI): affected all versions; fixed in 3.2.0\n- fastmcp (PyPI): affected all versions; fixed in 3.2.0\n- fastmcp (PyPI): affected all versions; fixed in 3.2.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-64340/ (Markdown: https://insights.sbomify.com/CVE-2025-64340/index.md)","id":"CVE-2025-64340","markdown":"https://insights.sbomify.com/CVE-2025-64340/index.md","name":"CVE-2025-64340","record":{"aliases":["CLSA-2026-1781139162","ECHO-8490-867c-f16b","GHSA-m8x7-r2rg-vh5g","PYSEC-2026-2475","ROOT-APP-PYPI-CVE-2025-64340"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"FastMCP Python library","requires_auth":"low_privilege","summary":"An attacker can execute arbitrary commands on Windows by providing server names with shell metacharacters during FastMCP installation.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fastmcp","vendor":"jlowin"}],"cvss":{"score":6.7,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"FastMCP has a Command Injection vulnerability - Gemini CLI","id":"CVE-2025-64340","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"ESF-IDF's ESP32 Bluetooth Controller Has an Invalid Access Address Vulnerability","id":"CVE-2025-64342"},"packages":[{"ecosystem":"PyPI","fixed":["3.2.0"],"introduced":["0"],"last_affected":[],"package":"fastmcp","purl":null,"source":"GHSA-m8x7-r2rg-vh5g"},{"ecosystem":"PyPI","fixed":["3.2.0"],"introduced":["0"],"last_affected":[],"package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"GHSA-m8x7-r2rg-vh5g"},{"ecosystem":"PyPI","fixed":["3.2.0"],"introduced":["0"],"last_affected":[],"package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"PYSEC-2026-2475"}],"prev":{"headline":"ClipBucket v5: Stored XSS Vulnerability in Manage Playlists","id":"CVE-2025-64339"},"products":["fastmcp"],"published":"2026-04-03","related":[{"cvss_score":10,"headline":"FastMCP OpenAPI Provider has an SSRF \u0026 Path Traversal Vulnerability","id":"CVE-2026-32871","kev_date_added":null,"published":"2026-04-02"},{"cvss_score":8.2,"headline":"FastMCP: Missing Consent Verification in OAuth Proxy Callback Facilitates Confused Deputy Vulnerabilities","id":"CVE-2026-27124","kev_date_added":null,"published":"2026-04-03"},{"cvss_score":7.4,"headline":"FastMCP OAuth Proxy token reuse across MCP servers","id":"CVE-2025-69196","kev_date_added":null,"published":"2026-03-16"},{"cvss_score":5.4,"headline":"FastMCP vulnerable to windows command injection in FastMCP Cursor installer via server_name","id":"CVE-2025-62801","kev_date_added":null,"published":"2025-10-28"},{"cvss_score":5.3,"headline":"FastMCP vulnerable to reflected XSS in client's callback page","id":"CVE-2025-62800","kev_date_added":null,"published":"2025-10-28"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-03","vendors":["jlowin"]},"summary":"An attacker can execute arbitrary commands on Windows by providing server names with shell metacharacters during FastMCP installation.","url":"https://insights.sbomify.com/CVE-2025-64340/"}