FastMCP
CVE-2025-62800
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft callback URL with XSS payload in error param
-
ExploitLure victim or redirect via malicious authorization_endpoint
-
ExecutionUnescaped value injected into generated callback HTML
-
ImpactArbitrary JavaScript executes in callback server origin
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the victim to be running a FastMCP OAuth client (version < 2.13.0) with its local OAuth callback server actively listening during an in-progress authorization flow, and the victim's browser must load an attacker-controlled callback URL - either by being lured to it or, per the advisory, by a malicious/compromised authorization server returning the exploit URL in the authorization_endpoint field so the client opens it automatically. The specific trigger is an unescaped user-controlled value (notably the error GET parameter, among others passed to create_callback_html) reflected into the callback HTML. Limiting factors: exploitation depends on passive user interaction (UI:P), an active and typically localhost-bound ephemeral callback server, and the impact is confined to that callback origin rather than the MCP server or host system; no authentication is required (PR:N). |
| Impact | This is a genuine but moderate-severity issue, not a top-tier priority. The vendor-assigned CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, score 5.3) describes a network-reachable, low-complexity, unauthenticated flaw that nonetheless requires passive user interaction and produces no impact on the vulnerable system itself (VC:N/VI:N/VA:N); the only impact is to a subsequent system (SC:L/SI:L) - the browser rendering the local callback page. This is consistent with a classic reflected XSS (CWE-79). Exploitation signals are mixed-to-low: EPSS is only 0.28% (18th percentile), indicating low predicted real-world exploitation volume, and the CVE is NOT in CISA KEV, so there is no evidence of active exploitation. However, publicly available exploit code (a concrete PoC in the GitHub Security Advisory) does exist, which raises practical accessibility for an attacker. The key limiting factor the raw vector understates is the attack surface: the vulnerable callback server is an ephemeral, typically localhost-bound listener that is only running during an active OAuth client flow, which sharply narrows the realistic window and targeting. Net: real and worth patching, but behaviorally closer to a targeted/opportunistic developer-workstation risk than a widespread remotely-exploitable server flaw. |
| Exploit ScenarioDerived | A developer runs a FastMCP OAuth client, which spins up a local callback server during the authorization flow. An attacker (or a malicious/compromised authorization server that controls the redirect) induces the victim's browser to load the callback URL with an XSS payload in the error parameter (e.g. ?error=<img/src/onerror=...>), and the unescaped value executes arbitrary JavaScript in the callback server's origin. A working PoC is published in the GHSA advisory, demonstrating alert(window.origin) via the crafted callback request. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Reflected cross-site scripting in FastMCP versions prior to 2.13.0 lets an attacker execute arbitrary JavaScript in the origin of the local OAuth callback server that the FastMCP client spins up during an authorization flow. The flaw is in the client's callback page, where the message argument passed to create_callback_html - including values taken directly from GET parameters such as error - is inserted into the returned HTML without escaping; a crafted callback URL such as http://localhost:1337/callback?error=<img/src/onerror=alert(window.origin)> triggers script execution in the victim's browser. Publicly available exploit code exists (the advisory itself documents a PoC), but there is no CISA KEV entry indicating confirmed active exploitation, and EPSS is low at 0.28% (18th percentile), consistent with a genuine but moderate-severity issue rather than a top-tier priority. Exploitation requires the victim to be running an affected OAuth client with its callback server actively listening during an in-progress authorization flow, and requires user interaction (UI:P) - typically luring the user to a malicious callback URL or using a malicious/compromised authorization server that returns the exploit URL in the authorization_endpoint field so the client opens it automatically; no authentication is required (PR:N).
RemediationAI
Vendor-released patch: upgrade to FastMCP 2.13.0, which escapes the user-controlled values rendered by create_callback_html; the fix is upstream in PR https://github.com/jlowin/fastmcp/pull/2090 with commit 2a20f54617a37213ed83894a8c2f0ac38a2e83a3, and installs should be validated with a dependency pin or lockfile check for fastmcp>=2.13.0. If upgrading is not immediately possible, compensating controls must address the specific reflection primitive and its exposure window: treat the callback server as untrusted-input surface and restrict reachability by keeping it strictly bound to loopback and closing it as soon as the flow completes (trade-off: adds client-side cleanup logic and can break long-running flows), avoid running the affected OAuth client on multi-user or remote-desktop hosts where another local user can reach the ephemeral port (trade-off: limits usability of the client in shared environments), and harden the authorization-server trust decision by pinning/allow-listing known-good authorization_endpoint values so a malicious or compromised AS cannot auto-open the exploit URL (trade-off: requires configuration management and can break legitimate dynamic AS discovery). General browser-side XSS mitigations (CSP on anything serving the callback origin, disabling JavaScript) are only partially applicable to a localhost page generated by the library and should not be relied on as the primary fix. Note that patching is straightforward given the fix is already released, and exploitation, while documented by a public PoC, is not confirmed as actively exploited per CISA KEV.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
FastMCP is a Python framework for building Model Context Protocol (MCP) applications, distributed as the pip package fastmcp (CPE cpe:2.3:a:jlowin:fastmcp:*:*:*:*:*:*:*:*, i.e. all versions before the 2.13.0 fix). Its OAuth client implements the standard authorization-code flow with a loopback redirect, starting a short-lived local HTTP callback server (by default bound to a localhost port such as 127.0.0.1:1337) that renders a result page via create_callback_html in src/fastmcp/client/oauth_callback.py. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation / cross-site scripting): the function interpolates caller-supplied strings - notably the error GET parameter, plus other parameters reaching the same function - into the generated HTML without HTML-escaping or sanitization. Because the injected content is reflected into a page served by the callback server, the malicious script runs in that server's origin, which is why the vendor's CVSS v4.0 vector carries a changed scope (SC:L) and our assessed CVSS:3.1 vector rates S:C/C:L/I:L/A:N. The JavaScript does not pivot to the MCP server itself or to the host filesystem; impact is confined to the callback origin. Two trigger paths are documented: direct navigation to the crafted callback URL, or a malicious authorization server returning the exploit URL in the authorization_endpoint field so that the client opens the XSS payload automatically without further user action.
Know when Fastmcp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Network-reachable unauthenticated reflected XSS requiring the victim to load a crafted URL (UI:R), executing script in a different origin (S:C) with limited C/I and no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
FastMCP is the standard framework for building MCP applications. Versions prior to 2.13.0 have a reflected cross-site scripting vulnerability in the OAuth client callback page (oauth_callback.py) where unescaped user-controlled values are inserted into the generated HTML, allowing arbitrary JavaScript execution in the callback server origin. The issue is fixed in version 2.13.0.
Blast Radius
ecosystem impact- 34 pypi packages depend on fastmcp (32 direct, 2 indirect)
Ecosystem-wide dependent count for version 2.13.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
NVD
CVE.org
EPSS
GitHub
Exploit-DB