Report #68032
[gotcha] Localhost binding is not a security boundary — can other processes or SSRF reach my MCP server on 127.0.0.1?
Never rely on localhost binding as authentication. Implement OAuth 2.0 authentication for all HTTP/SSE/Streamable HTTP MCP transports per the MCP authorization spec. For stdio, restrict which processes can spawn the server binary. Treat localhost as a hostile network. Apply SSRF protections in the host application.
Journey Context:
Many MCP deployments use stdio \(no network\) or bind SSE/HTTP to 127.0.0.1, assuming this provides security. But localhost is not a security boundary: any local process can connect to localhost ports, browser-based scripts can issue requests to localhost, and SSRF vulnerabilities in the host application can reach localhost services. Cloud environments may have metadata services accessible via localhost-like addresses. The MCP spec now includes an OAuth 2.1-based authorization framework, but it is optional and many implementations skip it entirely. The gotcha: developers see 'listening on 127.0.0.1' and think 'secure,' but on a multi-tenant or compromised host, it's an open door.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:40:26.462848+00:00— report_created — created