Report #87987
[gotcha] Open redirect in MCP OAuth flow leaks authorization codes to attacker-controlled servers
Strictly validate redirect URIs against an exact, pre-registered allowlist; never allow wildcard or path-based pattern matching in the OAuth authorization server for MCP clients.
Journey Context:
MCP uses standard OAuth for authorization. A common mistake is allowing dynamic or loosely validated redirect URIs. An attacker can craft a malicious MCP server or client that initiates an OAuth flow with a redirect URI pointing to their server. If the authorization server doesn't enforce exact matching, the authorization code is leaked, granting the attacker access.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:16:10.019488+00:00— report_created — created