{"id":"CVE-2025-62800","aliases":["CVE-2025-62800","GHSA-mxxr-jv3v-6pgc","PYSEC-2026-1364"],"related":[],"kind":"vulnerability","state":"published","title":"FastMCP vulnerable to reflected XSS in client's callback page","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nWhile setting up an oauth client, it was noticed that the callback page hosted by the client during the flow embeds user-controlled content without escaping or sanitizing it. This leads to a reflected Cross-Site-Scripting vulnerability.\n\n### Details\nThe affected code is located in *https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/oauth_callback.py*, which embeds all values passed to the `create_callback_html` function via the `message` parameter it into the callback page without escaping them. This can, for example, be abused by calling the callback server with an XSS payload inside the `error` GET parameter, the value of which will then be inserted into the callback page, causing the execution of attacker-controlled JavaScript code in the callback server's origin. Note that besides the `error` parameter, other parameters reaching this function are affected too.\n\n### PoC\n1. Setup a simple fastmcp client such as this one (the callback server's port was fixated for simplicity):\n\n```\nurl=\"http://127.0.0.1:8000/mcp\"\noauth = OAuth(mcp_url=url,callback_port=1337)\n\nasync def main():\n    async with Client(url, auth=oauth) as client:\n        await client.ping()\n        \n        # List available operations\n        tools = await client.list_tools()\n\n        print(f\"tools: {tools}\")\n       \nasyncio.run(main())\n```\n\n2. Ensure that the MCP server located at `http://127.0.0.1:8000/mcp` supports oauth.\n3. Start the client.\n4. As soon as the callback server has been started, access `http://localhost:1337/callback?error=<img/src/onerror=alert(window.origin)>`\n\nNote that the exploitation could also for example be initiated by a malicious authorization server by returning the exploitation URL mentioned before in the `authorization_endpoint` field. The client would then automatically open, causing the XSS to trigger immediatly.\n\n### Impact\nThe impact of this XSS vulnerability is the arbitrary JavaScript execution in the victim's browser in the callback server's origin.","format":"markdown","source":"ghsa"},{"lang":"es","text":"FastMCP es el framework estándar para construir aplicaciones MCP. Las versiones anteriores a la 2.13.0 tienen una vulnerabilidad de cross-site scripting reflejado en la página de callback del cliente OAuth (oauth_callback.py) donde valores controlados por el usuario sin escapar son insertados en el HTML generado, permitiendo la ejecución arbitraria de JavaScript en el origen del servidor de callback. El problema está solucionado en la versión 2.13.0.","source":"nvd"}],"published":"2025-10-28T21:34:40.392Z","modified":"2026-10-08T11:10:00.250Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 2.13.0","status":"affected"}],"vendor":"jlowin","product":"fastmcp","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.13.0"}],"ecosystem":"PyPI","package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.13.0"}],"vendor":"jlowin","product":"fastmcp","cpe":"cpe:2.3:a:jlowin:fastmcp:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.13.0"}],"ecosystem":"PyPI","package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"pysec"}],"references":[{"url":"https://github.com/jlowin/fastmcp/security/advisories/GHSA-mxxr-jv3v-6pgc","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62800","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/jlowin/fastmcp/pull/2090","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/jlowin/fastmcp/commit/2a20f54617a37213ed83894a8c2f0ac38a2e83a3","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/jlowin/fastmcp","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/fastmcp","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-mxxr-jv3v-6pgc","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-10-29T15:52:40.720Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-62800","url":"https://www.cve.org/CVERecord?id=CVE-2025-62800","licence":"CVE Terms of Use","modified":"2025-10-29T15:52:44.433Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mxxr-jv3v-6pgc","url":"https://github.com/advisories/GHSA-mxxr-jv3v-6pgc","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:05.411Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-62800","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62800","licence":"Public domain","modified":"2026-10-08T11:10:00.250Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1364","url":"https://osv.dev/vulnerability/PYSEC-2026-1364","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:12.914Z"}],"updatedAt":"2026-11-25T22:59:06.973Z","epss":{"score":0.00276,"percentile":0.21474,"date":"2026-12-01T12:00:22.000Z"}}