Skip to content
Xianzhi Community (Aliyun)·Indexed by this site · Originally published· Event →· Its place in the scan record →SelectedAttention39

FastMCP OpenAPI path traversal to authenticated SSRF: reproduction and analysis

AI summary

FastMCP's OpenAPIProvider automatically generates MCP tools from the interfaces in an OpenAPI spec, but path parameters are concatenated directly into the template without URL encoding, and then handed to urllib.parse.urljoin(), which parses ../, so a client can inject directory traversal sequences in a path parameter and, carrying the authentication header configured by the provider, request backend paths outside the spec; the vendor classifies this as SSRF under an authenticated context (GHSA-vv7q-7jx5-f767, CWE-918, High). The author built a backend and MCP server locally and reproduced the entire chain, retrieving the database password and API key returned by an internal interface on the vulnerable version 3.1.0; affected versions are fastmcp < 3.2.0, and on 3.2.0 the same request returns 404 because ../ is encoded.

Why it was selected

The article breaks down the full chain from code to local reproduction of path traversal turning into SSRF, and compares the fix differences between 3.1.0 and 3.2.0.

Read originalxz.aliyun.com