PyPI: fastmcp

CVE-2026-27124

Safety vulnerability ID: SFTY-20260331-74859

Safety legacy ID: pyup.io-91321

Affected versions of the fastmcp package are vulnerable to Improper Input Validation due to missing consent verification in the OAuth proxy callback flow. Specifically, OAuthProxy._handle_idp_callback accepts a valid state and IdP code pair and forwards the browser to the client callback without verifying that the same browser session actually completed the consent step, which makes OAuth integrations vulnerable when the identity provider can skip consent for previously authorized clients.

Created at: Apr 22, 2026Updated at: Apr 22, 2026

Overview

FastMCP: Missing Consent Verification in OAuth Proxy Callback Facilitates Confused Deputy Vulnerabilities

Advisory

Affected versions of the fastmcp package are vulnerable to Improper Input Validation due to missing consent verification in the OAuth proxy callback flow. Specifically, OAuthProxy._handle_idp_callback accepts a valid state and IdP code pair and forwards the browser to the client callback without verifying that the same browser session actually completed the consent step, which makes OAuth integrations vulnerable when the identity provider can skip consent for previously authorized clients.

Affected Package

Affecting fastmcp package, versions
<3.2.0

Also affects

---

How to Fix

Upgrade
fastmcp
to
3.2.0
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