# CVE-2026-32871: PrefectHQ FastMCP path traversal and SSRF in OpenAPIProvider

Source: https://junglewise.ai/threats/cve-2026-32871-prefecthq-fastmcp-path-traversal-and-ssrf-in-openapiprovider  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-02. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-32871 · Severity: critical · CVSS 10 · Published 2026-04-02

FastMCP is a Python library used to build Model Context Protocol (MCP) servers and clients, which allow AI models to interact with external tools and data. A security flaw in how the library handles web API requests allows an attacker to bypass intended security boundaries and access restricted internal systems. This could lead to unauthorized access to sensitive backend data or the execution of administrative actions using the server's own credentials.

Technologies: [fastmcp (PyPI)](https://junglewise.ai/threats/technologies/fastmcp). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-32871 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-32871 being exploited in the wild.

**How severe is CVE-2026-32871?** Critical severity, with a CVSS score of 10, published 2 April 2026.

**Which products and versions are affected?** fastmcp (PyPI) < 3.2.0, ECOSYSTEM:introduced=0,fixed=3.2.0.

**Is there a fix for CVE-2026-32871?** Yes. fastmcp (PyPI): upgrade to 3.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-32871 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-32871?** Check whether you run fastmcp (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- fastmcp (PyPI): upgrade to 3.2.0 or later

  ```sh
  pip install "fastmcp>=3.2.0"
  ```


## Technical details

A path traversal vulnerability exists in the RequestDirector._build_url() method of FastMCP's OpenAPIProvider. When processing OpenAPI operations, the library substitutes path parameter values directly into URL templates without performing URL-encoding. Because the final URL is resolved using urllib.parse.urljoin(), an attacker can provide input containing '../' sequences to traverse out of the intended API path. This enables authenticated Server-Side Request Forgery (SSRF), as the resulting requests are sent to arbitrary backend endpoints using the authorization headers configured in the MCP provider. The issue is fixed in version 3.2.0 by applying percent-encoding to all path parameters.

## Affected products

- PrefectHQ fastmcp < 3.2.0

## Identifiers

- CVE-2026-32871
- GHSA-vv7q-7jx5-f767
- PYSEC-2026-338

## Timeline

- 2026-03-15: patched: Fix merged into main branch
- 2026-03-30: advisory: Version 3.2.0 released with security hardening
- 2026-04-02: disclosed: CVE-2026-32871 published

## References

- [https://github.com/PrefectHQ/fastmcp/commit/40bdfb6b1de0ce30609ee9ba5bb95ecd04a9fb71](https://github.com/PrefectHQ/fastmcp/commit/40bdfb6b1de0ce30609ee9ba5bb95ecd04a9fb71)
- [https://github.com/PrefectHQ/fastmcp/pull/3507](https://github.com/PrefectHQ/fastmcp/pull/3507)
- [https://github.com/PrefectHQ/fastmcp/releases/tag/v3.2.0](https://github.com/PrefectHQ/fastmcp/releases/tag/v3.2.0)
- [https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-vv7q-7jx5-f767](https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-vv7q-7jx5-f767)
- [https://access.redhat.com/security/cve/CVE-2026-32871](https://access.redhat.com/security/cve/CVE-2026-32871)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2454434](https://bugzilla.redhat.com/show_bug.cgi?id=2454434)
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32871.json](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32871.json)

## Related threats

- [FastMCP post-transform component authorization bypass](https://junglewise.ai/threats/fastmcp-post-transform-component-authorization-is-skipped-on-direct-a9992939)
- [FastMCP OAuth provider missing issuer binding in M2M credential exchange](https://junglewise.ai/threats/fastmcp-mcp-client-wrappers-construct-m2m-oauth-providers-without-af21ca1f)
- [FastMCP confused deputy vulnerability in OAuthProxy callback](https://junglewise.ai/threats/cve-2026-27124-fastmcp-confused-deputy-vulnerability-in-oauthproxy-callback)
- [PrefectHQ FastMCP command injection in CLI install on Windows](https://junglewise.ai/threats/cve-2025-64340-prefecthq-fastmcp-command-injection-in-cli-install-on-windows)
- [PrefectHQ FastMCP improper resource handling in OAuth Proxy](https://junglewise.ai/threats/cve-2025-69196-prefecthq-fastmcp-improper-resource-handling-in-oauth-proxy)
