PyPI: fastmcp

CVE-2025-69196

Safety vulnerability ID: SFTY-20260316-32346

Safety legacy ID: pyup.io-89420

Affected versions of the fastmcp package are vulnerable to Improper Input Validation due to incorrect handling of the OAuth resource parameter during token issuance. In src/fastmcp/server/auth/oauth_proxy.py, the OAuthProxy initialises JWTIssuer with issuer=str(self.base_url) and audience=f"{str(self.base_url).rstrip('/')}/mcp", so issued access and refresh tokens are bound to the proxy base_url rather than the client-supplied target resource, preventing MCP servers from verifying that a token was issued specifically for them.

Created at: Mar 18, 2026Updated at: Mar 18, 2026

Overview

FastMCP OAuth Proxy token reuse across MCP servers

Advisory

Affected versions of the fastmcp package are vulnerable to Improper Input Validation due to incorrect handling of the OAuth resource parameter during token issuance. In src/fastmcp/server/auth/oauth_proxy.py, the OAuthProxy initialises JWTIssuer with issuer=str(self.base_url) and audience=f"{str(self.base_url).rstrip('/')}/mcp", so issued access and refresh tokens are bound to the proxy base_url rather than the client-supplied target resource, preventing MCP servers from verifying that a token was issued specifically for them.

Affected Package

Affecting fastmcp package, versions
<2.14.2

Also affects

---

How to Fix

Upgrade
fastmcp
to
2.14.2
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more