CVE-2026-32871: FastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerability
The OpenAPIProvider in FastMCP exposes internal APIs to MCP clients by parsing OpenAPI specifications. The RequestDirector class is responsible for constructing HTTP requests to the backend service.
What it is
The OpenAPIProvider in FastMCP exposes internal APIs to MCP clients by parsing OpenAPI specifications. The RequestDirector class is responsible for constructing HTTP requests to the backend service.
A critical vulnerability exists in the _build_url() method. When an OpenAPI operation defines path parameters (e.g., /api/v1/users/{user_id}), the system directly substitutes parameter values into the URL template string without URL-encoding. Subsequently, urllib.parse.urljoin() resolves the final URL.
Since urljoin() interprets ../ sequences as directory traversal, an attacker controlling a path parameter can perform path traversal attacks to escape the intended API prefix and access arbitrary backend endpoints. This results in authenticated SSRF, as requests are sent with the authorization headers configured in the MCP provider.
How to check
- Affected: fastmcp (pip) < 3.2.0.
- Compare your installed version with the range above (command below).
How to fix
- Upgrade fastmcp to 3.2.0 or later.
pip show fastmcp | grep VersionSources
- criticalCVE-2025-6514: mcp-remote exposed to OS command injection via untrusted MCP server connections
- criticalCVE-2025-49596: MCP Inspector proxy server lacks authentication between the Inspector client and proxy
- highCVE-2026-104850: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
- highCVE-2026-59950: MCP Python SDK: WebSocket server transport does not support Host/Origin validation