Report #11228
[gotcha] SSE MCP server accepts tool calls from any origin due to missing CORS and Origin validation
Validate the Origin header on every incoming HTTP request to the MCP SSE or Streamable HTTP endpoint. Set strict CORS policies allowing only expected origins. Rotate session IDs after establishment. For production, prefer the Streamable HTTP transport with proper authentication over legacy SSE.
Journey Context:
The SSE transport uses a persistent HTTP connection for server-to-client messages and a POST endpoint for client-to-server messages. If the server does not validate the Origin header, any malicious website can make cross-origin POST requests to the MCP server, sending tool calls and receiving results via the SSE stream. This is a classic CSRF pattern applied to MCP. The MCP spec defines session management via Mcp-Session-Id headers but does not mandate Origin validation, leaving it as an implementation detail. Many reference implementations and community servers omit Origin checks entirely, making any locally-running MCP server with HTTP transport vulnerable to drive-by attacks from any webpage the user visits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:49:15.870595+00:00— report_created — created