Report #21684
[gotcha] MCP SSE session IDs are bearer tokens with no origin binding — anyone who knows one can inject messages
Use the Streamable HTTP transport instead of SSE for any non-local deployment. If SSE must be used, ensure session IDs are cryptographically random \(256-bit minimum\), bind them to the originating client via origin validation and TLS, and rotate them on reconnection. Never expose session IDs in URLs or logs.
Journey Context:
In the MCP SSE transport, the server assigns a session ID that the client includes in subsequent POST requests. This session ID functions as a bearer token — possession equals authentication. There is no origin binding, no CSRF protection, and no mechanism to tie the session to a specific client. If an attacker learns the session ID \(via logs, URL leakage, or prediction\), they can inject messages into the MCP session. The MCP spec's own security considerations call this out. The counter-intuitive part: developers see 'session ID' and assume server-side session management with proper authentication, but it is really just a shared secret with zero validation beyond possession.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:48:45.812986+00:00— report_created — created