Skip to main content

Microsoft CVE-2026-27124

HIGH
Unintended Proxy or Intermediary ('Confused Deputy') (CWE-441)
2026-03-31 https://github.com/PrefectHQ/fastmcp GHSA-rww4-4w9c-7733
8.2
CVSS 4.0 · Vendor: https://github.com/PrefectHQ/fastmcp
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Connect malicious MCP client to benign server
  2. Delivery
    Initiate GitHub OAuth flow
  3. Exploit
    Exploit missing consent validation in OAuthProxy
  4. Execution
    Bypass authorization checks via Confused Deputy
  5. Impact
    Gain unauthorized access to protected resources

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service Proxy/intermediary controls
Exploitation Conditions

Requires FastMCP OAuthProxy configured with GitHubProvider OAuth integration. Attacker creates malicious MCP client connecting to benign MCP server. Victim must have previously authorized the GitHub OAuth application; no additional consent prompt appears. No direct victim interaction required beyond initial GitHub OAuth authorization.

Impact

This vulnerability presents significant real-world risk for FastMCP deployments using OAuth authentication, particularly in multi-tenant or shared MCP server environments. Without CVSS scoring data, risk assessment relies on attack complexity and impact analysis from the technical description. The attack requires moderate social engineering (luring victims to click a malicious URL) but is straightforward to execute once victims have previously authorized any MCP client to the target server, as demonstrated by the detailed 11-step reproduction procedure. Attack prerequisites include: victim must be logged into the OAuth provider (GitHub), must have previously authorized an MCP client to the server (creating the consent-skip condition), and attacker must successfully deliver the malicious authorization URL. The technical impact is severe-complete authentication bypass allowing unauthorized access to MCP server resources under the victim's identity, potentially exposing sensitive data or capabilities managed through the MCP interface. Exploitation is not automatable at scale due to social engineering requirements, but the vulnerability is architecturally exploitable across all OAuth providers that implement consent skipping. The presence of publicly documented reproduction steps in GitHub advisories significantly lowers the barrier for exploitation. Priority should be high for organizations using FastMCP with OAuth, especially if serving multiple users or handling sensitive MCP server operations.

Exploit ScenarioDerived

An attacker deploys a malicious MCP client or simple web server designed to log OAuth callbacks. The attacker initiates an OAuth flow to a legitimate MCP server using GitHubProvider, intercepts the GitHub authorization URL after the consent prompt, then abandons the authentication. The attacker crafts a phishing email or chat message to a victim who has previously connected their own MCP client to the same server, enticing them to click the captured authorization URL (perhaps disguised as a legitimate server reconnection link). When the victim, already logged into GitHub, clicks the link, GitHub skips the consent screen and immediately redirects to the OAuthProxy callback with a valid authorization code. Because the OAuthProxy fails to validate consent cookies, it processes the callback and redirects the victim's browser to the attacker's malicious client callback URL with a fresh authorization code. The attacker's server receives this code, exchanges it for an access token valid for the MCP server under the victim's GitHub identity, and gains persistent access to the victim's MCP server resources, potentially accessing private data sources, executing commands, or manipulating integrations tied to the victim's account.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 31, 2026

FastMCP OAuthProxy allows authentication bypass through a Confused Deputy attack, enabling attackers to hijack victim OAuth sessions and gain unauthorized access to MCP servers. When victims who previously authorized a legitimate MCP client are tricked into opening a malicious authorization URL, the OAuthProxy fails to validate browser-bound consent, redirecting valid authorization codes to attacker-controlled clients. This affects the GitHubProvider integration and potentially all OAuth providers that skip consent prompts for previously authorized applications. No public exploit identified at time of analysis, though detailed reproduction steps are publicly documented in the GitHub security advisory.

RemediationAI

Implement browser-bound consent validation in the OAuthProxy callback handler as recommended in the MCP specification security best practices. The primary mitigation involves setting a secure, HttpOnly, SameSite consent cookie during the initial authentication flow and validating this cookie's presence when processing the IdP callback in the OAuthProxy._handle_idp_callback function. This ensures the browser receiving the authorization code is the same browser that granted consent, preventing Confused Deputy attacks. Alternative or supplementary controls include implementing PKCE (Proof Key for Code Exchange) flow binding, session-specific state tokens tied to browser sessions, or short-lived nonce validation. Organizations should monitor the GitHub security advisories at https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-rww4-4w9c-7733 and https://github.com/jlowin/fastmcp/security/advisories/GHSA-rww4-4w9c-7733 for vendor-released patches with specific fix versions. Until patches are available, consider temporary mitigations such as disabling OAuth authentication if alternative authentication methods exist, implementing network-level restrictions on MCP server access, or adding custom middleware to validate OAuth callbacks. Organizations should audit existing OAuth sessions for anomalous authorization patterns that might indicate exploitation.

Affected Packages

pypi fastmcp fix: 3.2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

FastMCP is a Python package (pkg:pip/fastmcp) that implements OAuth-based authentication for Model Context Protocol (MCP) servers through an OAuthProxy component. The vulnerability stems from CWE-441 (Unintended Proxy or Intermediary / Confused Deputy), where the OAuthProxy acts as an intermediary between OAuth identity providers and MCP clients but fails to maintain proper session binding. The root cause lies in the OAuthProxy._handle_idp_callback function, which processes OAuth callbacks by accepting any valid state and code parameter pair without verifying that the browser presenting these credentials is the same user-agent that initiated the authentication flow and granted consent. OAuth providers like GitHub legitimately skip consent screens for previously authorized applications with identical scopes, which is standard behavior but becomes exploitable when the callback handler lacks browser-bound state validation (such as consent cookies or PKCE-equivalent binding mechanisms). The attack exploits the separation between the consent-granting browser session and the code-receiving browser session, allowing an attacker to substitute their malicious client's callback URL while using a victim's valid authorization grant.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/PrefectHQ/fastmcp) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (https://github.com/PrefectHQ/fastmcp).

CVSS VectorVendor: https://github.com/PrefectHQ/fastmcp

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Apr 01, 2026 - 02:30 nvd
Patch available
CVE Published
Mar 31, 2026 - 22:32 nvd
HIGH 8.2

DescriptionCVE.org

Summary

While testing the *GitHubProvider* OAuth integration, which allows authentication to a FastMCP MCP server via a FastMCP OAuthProxy using GitHub OAuth, it was discovered that the FastMCP OAuthProxy does not properly validate the user's consent upon receiving the authorization code from GitHub. In combination with GitHub’s behavior of skipping the consent page for previously authorized clients, this introduces a Confused Deputy vulnerability.

Technical Details

An adversary can initiate an authentication flow by connecting their malicious MCP client to a benign MCP server using the *GitHubProvider* OAuth integration. During this flow, the attacker consents to connect their client to the MCP server and, at that point, can capture the GitHub authorization URL they are redirected to after granting consent. The attacker can then lure a victim, who is already logged into GitHub and has previously connected an MCP client to the benign MCP server, to open this captured URL. As a result, the victim’s browser is immediately redirected to the OAuthProxy’s callback endpoint, which does not correctly enforce that this browser has just given consent. The OAuthProxy then redirects the victim’s browser to the malicious MCP client’s callback URL with a valid authorization code. The attacker can exchange this code for an access token to the benign MCP server associated with the victim’s GitHub account, potentially gaining unauthorized access to resources tied to that account.

Although this issue was verified in practice only for the *GitHubProvider*, a review of the source code, specifically the OAuthProxy._handle_idp_callback function, shows that the IdP callback handler does not verify whether the browser sending the state and code has previously consented to connecting the client to the server. As long as a valid state and code pair is provided, the OAuthProxy requests an access token from the IdP and then redirects the user-agent to the client’s callback URL with a new code and the corresponding state, allowing the client to retrieve the access token from the proxy. This pattern causes all OAuth integrations whose IdP allows skipping the consent page to be vulnerable to this attack.

Skipping the consent page is not, by itself, a vulnerability on the IdP side. Many providers legitimately skip consent for first-party or previously authorized clients with the same scopes. In this case, the core problem lies in the OAuthProxy callback handler not correctly verifying that the browser issuing the callback request is the same one that has just given the required consent.

Steps to reproduce

  1. Set up an MCP server using the *GitHubProvider* integration.
  2. Connect a benign MCP client to this MCP server.
  3. Configure your default browser to route all traffic through an interception proxy such as Burp Suite.
  4. In a private browsing window or a second browser, log into the GitHub account used in step 2.
  5. As the attacker, connect a new (malicious) MCP client to the MCP server from step 1.
  6. When the browser opens for the attacker’s client, enable interception in your proxy.
  7. In the browser, confirm the consent prompt.
  8. In the proxy, forward all requests up to the authorization request to the GitHub authorization server.
  9. Copy the authorization URL and drop the intercepted request.
  10. Simulate luring the victim onto the URL by opening this URL in the browser window opened in step 4.
  11. Observe that the malicious client receives a valid authorization code and gains access to the benign MCP server using the victim’s GitHub account.

In a more realistic scenario, the malicious client could be a public MCP client or a simple web server that logs the received authorization code or token, which the attacker then uses to obtain the access token and connect to the MCP server as the victim.

Recommendation

To mitigate this issue, the OAuthProxy should verify that the browser sending the authorization code has actually given consent for the corresponding client. This can be achieved by setting and validating a consent cookie or similar browser-bound state, as described in the mitigations section for this vulnerability in the MCP specification.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 32 pypi packages depend on fastmcp (29 direct, 3 indirect)

Ecosystem-wide dependent count for version 3.2.0.

Executive ViewAI

Why It Matters

FastMCP OAuthProxy contains an authentication bypass vulnerability that allows attackers to hijack OAuth sessions through a Confused Deputy attack, potentially compromising access to MCP servers and integrated services like GitHub. Organizations using FastMCP with OAuth-connected workflows face risk of unauthorized access to sensitive integrations if users are socially engineered into malicious authorization flows. This vulnerability affects any organization leveraging FastMCP for OAuth-based authentication without proper session binding controls.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or restrict access to FastMCP OAuthProxy endpoints from untrusted networks; (2) Require re-authentication for all OAuth scopes by configuring OAuth providers to always prompt for consent instead of skipping previously authorized applications; (3) Implement email-based alerts on OAuth token issuance; (4) Restrict MCP client registrations to pre-approved applications only; (5) Regularly audit OAuth token logs for unexpected authorization codes or client redirects.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)CVE.org

pkg:pip/fastmcp

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy