Report #9062
[gotcha] MCP SSE session endpoint allows third-party message injection
Validate the Origin header on all incoming POST requests to the SSE message endpoint. Use cryptographically random session identifiers with sufficient entropy. Bind sessions to authenticated clients. Prefer the Streamable HTTP transport over legacy SSE for new implementations.
Journey Context:
The MCP SSE transport works by the server sending the client a session endpoint URL, to which the client POSTs messages. If the session ID is predictable or the endpoint doesn't validate origin, any web page or script that discovers the URL can inject messages into the active MCP session — issuing tool calls or reading resources as the authenticated user. This is a classic session-hijacking surface that developers miss because the SSE transport feels like a simple pipe, but it exposes an HTTP endpoint that must be defended like any other.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:13:36.389033+00:00— report_created — created