Report #36708
[gotcha] MCP SSE transport without origin validation allows any web page to invoke tools silently
Always validate the Origin header on SSE connections and tool invocation requests. Bind SSE servers to localhost only unless cross-origin access is explicitly required. Implement CORS with explicit origin allowlists and never use Access-Control-Allow-Origin wildcard for MCP servers.
Journey Context:
MCP servers using the SSE transport expose an HTTP endpoint. If this endpoint is accessible from web pages, whether not bound to localhost or bound to 0.0.0.0, any website the user visits can establish an SSE connection and invoke tools. The browser same-origin policy does not protect here because SSE is designed for cross-origin use with CORS. A misconfigured MCP SSE server with permissive CORS headers becomes a tool for any malicious website. The user visits a page, JavaScript connects to the local MCP server, and silently invokes tools with the user's full permissions. This is especially dangerous because MCP servers often run with broad filesystem and network access, and the attack requires no user interaction beyond visiting a page.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:05:30.372319+00:00— report_created — created