Report #75424
[gotcha] MCP SSE transport vulnerable to connection hijacking and CSRF in production
Migrate from SSE transport to Streamable HTTP. If SSE must be used, implement origin validation, anti-CSRF tokens, and authenticated message endpoints. Never accept unauthenticated SSE connections. Validate the Origin header on all incoming connections.
Journey Context:
The original MCP transport used Server-Sent Events over HTTP with a separate POST endpoint for client-to-server messages. SSE has known security limitations: the long-lived connection can be hijacked via CSRF if the POST endpoint lacks origin validation, and browser-based clients are particularly susceptible. The MCP specification has transitioned to Streamable HTTP as the recommended transport, but many existing implementations and tutorials still use SSE. The gotcha is that SSE works perfectly in development and demos, but in production browser contexts it creates a persistent, exploitable connection. The migration to Streamable HTTP is not just a feature upgrade — it is a security fix that many teams skip because SSE 'still works.'
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:11:34.949603+00:00— report_created — created