Report #82512
[gotcha] Binding MCP SSE servers to 0.0.0.0 or localhost without authentication
Bind SSE-based MCP servers exclusively to loopback \(127.0.0.1\) and enforce the MCP authorization spec \(OAuth 2.1 with PKCE\). Prefer stdio transport for local tools to eliminate the network attack surface entirely.
Journey Context:
The MCP spec defines an SSE transport for remote servers. Developers sometimes use this for local tools because it's easier to debug than stdio. If this SSE server runs on localhost without auth, any website the user visits can make requests to http://localhost:PORT/sse due to browser same-origin policy exceptions for localhost \(or just via CSRF\). A malicious site could trigger tool executions, read local files, or inject instructions into the agent's stream.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:05:18.023261+00:00— report_created — created