← All advisories
CVE-2026-32871criticalSSRF & network2026-03-31

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.

01.

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.

02.

How to check

  1. Affected: fastmcp (pip) < 3.2.0.
  2. Compare your installed version with the range above (command below).
03.

How to fix

  1. Upgrade fastmcp to 3.2.0 or later.
pip show fastmcp | grep Version
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

New advisories, CVEs and fixes for Lovable, Bolt, v0, Replit, Base44 and Cursor apps. No roundups of things you already read.