← All advisories
GHSA-7xgj-8392-5q4rmediumBroken access control2026-10-20

FastMCP: direct calls skip authorization after transforms, and M2M OAuth clients can send their secret to a rogue auth server (fixed 3.4.10 / 4.1.2)

Two FastMCP advisories published on 20 October 2026. In 3.0.0–3.4.9 and 4.0.0–4.1.1, a direct tools/call (or resource/prompt lookup) returned a transformed component without re-checking its authorization policy, so a low-privilege client that knows the name could run a tool the policy denies. In 4.0.0–4.1.1, the client-side ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider had no issuer binding, so an untrusted MCP server could point the client at its own authorization server and receive the client secret. Fixed in 3.4.10 and 4.1.2; the OAuth fix also needs you to set issuer=.

01.

What it is

GHSA-7xgj-8392-5q4r (Moderate, 6.8): listing applied transforms and then authorized the final component, but the direct lookup path returned the transformed component without running its AuthCheck. With a transform that changes tags or metadata, a caller without the required scope could invoke an admin tool hidden from the list, or read a protected resource or prompt. Affects fastmcp and fastmcp-slim >= 3.0.0, < 3.4.10 and >= 4.0.0, < 4.1.2.

GHSA-vqqp-x5qm-5qp4 (Moderate, 5.9): the M2M OAuth client wrappers (introduced in 4.0.0a1) did not accept or forward an issuer, so the client trusted whatever authorization server the MCP server advertised and sent client_id and client_secret (or a signed assertion) there. Affects fastmcp and fastmcp-slim >= 4.0.0a1, < 4.1.2; 3.x doesn't have these wrappers.

The 4.1.2 fix adds an issuer parameter to both providers and requires MCP SDK 2.2.0. Upgrading alone is not enough: omitting issuer is still allowed (with an MCPDeprecationWarning).

02.

How to check

  1. Run `pip show fastmcp fastmcp-slim` and compare with 3.4.10 (3.x) or 4.1.2 (4.x).
  2. Servers: check whether you use component auth (restrict_tag / AuthCheck) together with tool, provider or session transforms, or proxy templates overlapping protected resources.
  3. Clients: search your code for ClientCredentialsOAuthProvider or PrivateKeyJWTOAuthProvider, especially where the MCP server URL comes from users or config.
03.

How to fix

  1. Upgrade to fastmcp / fastmcp-slim 3.4.10 or 4.1.2 or later.
  2. Pass issuer="https://your-auth-server" to ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider, and rotate client secrets that may have been sent to an untrusted MCP server.
  3. Until you upgrade, enforce authorization inside the tool handler instead of relying on a policy whose inputs a transform can change.
from fastmcp.client.auth import ClientCredentialsOAuthProvider

auth = ClientCredentialsOAuthProvider(
    client_id="my-client-id",
    client_secret="my-client-secret",
    issuer="https://auth.example.com",  # required for protection in 4.1.2+
)
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.