fastmcp/docs/servers/auth
Jeremiah Lowin 016b9f90e0
Fix confused deputy attack via consent binding cookie (#3201)
* Add consent binding cookie to prevent confused deputy attacks (GHSA-rww4-4w9c-7733)

The OAuthProxy's consent page verified user intent but didn't bind the
consenting browser to the IdP callback. An attacker could intercept the
upstream authorization URL after consent and send it to a victim, whose
browser would complete the flow without having the consent cookie.

This adds a signed consent binding cookie set during consent approval
(both manual and auto-approve paths) and verified in the IdP callback
handler. A different browser won't have this cookie and gets a 403.

* Use startswith for URL assertion in consent binding test

* Store consent bindings as per-transaction map to support parallel flows

* Only accept __Host- consent binding cookie on HTTPS

* chore: Update SDK documentation

---------

Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-17 10:24:07 -05:00
..
authentication.mdx Remove automatic environment variable loading from auth providers (#2752) 2025-12-26 15:37:59 -05:00
full-oauth-server.mdx Add storage backend documentation (#2137) 2025-10-19 19:24:13 -04:00
oauth-proxy.mdx Fix confused deputy attack via consent binding cookie (#3201) 2026-02-17 10:24:07 -05:00
oidc-proxy.mdx Add CIMD (Client ID Metadata Document) support for OAuth (#2871) 2026-02-06 13:44:52 -05:00
remote-oauth.mdx Add AzureJWTVerifier for Managed Identity token verification (#3058) 2026-02-02 19:59:13 -05:00
token-verification.mdx Add client_secret_post authentication to IntrospectionTokenVerifier (#2884) 2026-01-16 13:07:33 -05:00