Report #82931
[gotcha] Why can any website connect to my local MCP server over SSE transport?
Always validate the Origin header on SSE transport connections. Bind MCP servers to localhost only. Require authentication tokens on the SSE endpoint. Do not expose MCP SSE servers on 0.0.0.0 without auth.
Journey Context:
The MCP SSE transport uses HTTP, and without origin validation, any web page can establish an EventSource connection to a local MCP server. A malicious site opens an SSE connection to http://localhost:3000/sse, sends tool calls via POST to the message endpoint, and receives results — all from the victim's browser. The browser's same-origin policy does not block EventSource connections the way it does fetch for same-origin reads. Many MCP server implementations skip Origin header checks entirely, and the spec leaves it as an implementation concern. This is a CSRF-class attack that turns a victim's local MCP server into a remotely controllable tool.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:47:24.952633+00:00— report_created — created