CVE-2025-62801: Fastmcp FastMCP Vulnerable To Windows Command Vulnerability
MODERATECVE-2025-62801 is a MODERATE fastmcp vulnerable to windows command vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Fastmcp libraries in the PyPI ecosystem. The issue involves fastmcp vulnerable to windows command injection in fastmcp cursor installer via server_name. Remediation is available by upgrading affected packages to version 2.13.0.
CVE-2025-62801 at a Glance
How to Fix CVE-2025-62801
To remediate this vulnerability, upgrade all affected Fastmcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install fastmcp>=2.13.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show fastmcp
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-62801, inspect your installed packages using pip:
pip show fastmcp
Analyze the terminal output to locate any version of Fastmcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.13.0), your application is affected.
Note: The pip show fastmcp command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Fastmcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-62801 Affected Fastmcp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fastmcp
|
PyPI |
< 2.13.0
|
2.13.0
|
References
Frequently Asked Questions
What is CVE-2025-62801?
Which Fastmcp versions are affected?
What version fixes CVE-2025-62801?
Is fastmcp affected?
What CWE is associated with CVE-2025-62801?
How can I check PyPI dependencies for CVE-2025-62801?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rj5c-58rq-j5g5",
"modified" : "2025-10-29T15:39:03Z",
"published" : "2025-10-29T15:39:03Z",
"aliases" : [ "CVE-2025-62801" ],
"summary" : "FastMCP vulnerable to windows command injection in FastMCP Cursor installer via server_name",
"details" : "### Summary\nA command-injection vulnerability lets any attacker who can influence the server_name field of an MCP execute arbitrary OS commands on Windows hosts that run fastmcp install cursor\n\n### Details\n1. generate_cursor_deeplink(server_name, …) embeds server_name verbatim in a cursor://…?name= query string.\n2. open_deeplink() is invoked with shell=True only on Windows. That calls cmd.exe /c start <deeplink>.\n3. Any cmd metacharacter inside server_name (&, |, >, ^, …) escapes the start command and spawns an attacker-chosen process.\n\n### PoC\nserver.py \n```\n\nimport random\nfrom fastmcp import FastMCP\n\nmcp = FastMCP(name=\"test&calc\")\n\n@mcp.tool\ndef roll_dice(n_dice: int) -> 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\nif __name__ == \"__main__\":\n mcp.run()\n```\n\nthen run in the terminal:\n`fastmcp install cursor server.py`\n\n### Impact\nOS Command / Shell Injection (CWE-78)\nEvery Windows host that runs fastmcp install cursor is at risk. Developers on their local workstations, CI/CD agents and corporate build machines alike.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "fastmcp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.13.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jlowin/fastmcp/security/advisories/GHSA-rj5c-58rq-j5g5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62801"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jlowin/fastmcp"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-10-29T15:39:03Z",
"nvd_published_at" : "2025-10-28T22:15:37Z"
}
}