Report #1418
[gotcha] Local MCP server CORS bypass and DNS rebinding
Local MCP servers using SSE must strictly validate the Origin header and reject cross-origin requests. Never set Access-Control-Allow-Origin to \* on localhost servers.
Journey Context:
It is counter-intuitive that a local tool running on localhost is vulnerable to the internet. Developers often enable CORS \* for ease of local development. However, a malicious website can use DNS rebinding to bypass browser same-origin policies, sending requests to the local MCP server and silently invoking tools \(like file reading\) on the user's machine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T21:32:16.887753+00:00— report_created — created