FastMCP OAuth provider missing issuer binding in M2M credential exchange

Severity: medium · CVSS 5.9 · Published 2026-10-23

FastMCP is a client library for connecting to Model Context Protocol (MCP) servers, which are services that extend the capabilities of AI applications. The ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider wrappers fail to validate the authorization server's identity, allowing an attacker-controlled MCP server to redirect client credentials to an attacker's authorization server. This can result in theft of OAuth client secrets and subsequent account takeover or impersonation of legitimate clients.

Technologies: fastmcp (PyPI). Vendors: PyPI.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Medium severity, with a CVSS score of 5.9, published 23 October 2026.
Which products and versions are affected?
Fastmcp 4.0.0–4.1.1; Fastmcp-Slim 4.0.0–4.1.1; fastmcp (PyPI) >= 4.0.0a1, < 4.1.2, ECOSYSTEM:introduced=4.0.0a1,fixed=4.1.2; fastmcp-slim (PyPI) >= 4.0.0a1, < 4.1.2, ECOSYSTEM:introduced=4.0.0a1,fixed=4.1.2.
Is there a fix for This vulnerability?
Yes. fastmcp (PyPI): upgrade to 4.1.2 or later; fastmcp-slim (PyPI): upgrade to 4.1.2 or later. Until then: Configure the issuer parameter explicitly with the authorization server's issuer identifier; upgrade to 4.1.2 alone is insufficient because omission remains supported for backward compatibility. Rotate client secrets or other reusable credentials that may have been transmitted to an untrusted endpoint.</anigation> <parameter name="timeline">[{"kind": "disclosed", "at": "2026-10-23"}] Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run Fastmcp, Fastmcp-Slim, fastmcp (PyPI) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • fastmcp (PyPI): upgrade to 4.1.2 or later
    pip install "fastmcp>=4.1.2"
  • fastmcp-slim (PyPI): upgrade to 4.1.2 or later
    pip install "fastmcp-slim>=4.1.2"

Configure the issuer parameter explicitly with the authorization server's issuer identifier; upgrade to 4.1.2 alone is insufficient because omission remains supported for backward compatibility. Rotate client secrets or other reusable credentials that may have been transmitted to an untrusted endpoint.</anigation> <parameter name="timeline">[{"kind": "disclosed", "at": "2026-10-23"}]

Technical details

The vulnerability is a credential-binding flaw in FastMCP's OAuth client credentials providers: they accept OAuth metadata from an MCP server without validating that the advertised authorization server matches an expected issuer identifier. An untrusted or compromised MCP server can advertise a different token endpoint and receive the client secret in an OAuth exchange. The underlying MCP SDK supports issuer binding, but FastMCP's wrapper layer neither exposes nor enforces the issuer parameter. Exploitation requires the attacker to control or compromise the MCP server URL; the fix introduces a required issuer configuration parameter and discards refresh tokens to prevent credential leakage before issuer discovery.

Affected products

  • FastMCP fastmcp 4.0.0–4.1.1
  • FastMCP fastmcp-slim 4.0.0–4.1.1

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.