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.
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.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260331-74859/CVE-2026-27124
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-27124
- https://data.safetycli.com/changelogs/fastmcp/
- https://github.com/advisories/GHSA-rww4-4w9c-7733
- https://pypi.org/project/fastmcp
- https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-rww4-4w9c-7733
- https://github.com/jlowin/fastmcp/security/advisories/GHSA-rww4-4w9c-7733
- https://nvd.nist.gov/vuln/detail/CVE-2026-27124
- https://github.com/advisories/GHSA-rww4-4w9c-7733
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
