Report #6056
[gotcha] MCP client leaking OAuth authorization codes to a malicious server
Strictly validate the \`redirect\_uri\` during the MCP OAuth flow. Ensure the server's declared redirect URI exactly matches the registered URI, preventing open redirect attacks.
Journey Context:
The MCP specification includes a standard OAuth 2.0 flow for server authentication. If the client doesn't strictly validate the redirect URI provided by the server during discovery, a malicious server can redirect the OAuth flow to an attacker-controlled endpoint, capturing the authorization code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:06:08.988082+00:00— report_created — created