Report #86411
[gotcha] Local MCP servers exposed to the internet via permissive CORS headers
Never set Access-Control-Allow-Origin: \* on localhost MCP servers; validate the Origin header strictly to prevent DNS rebinding or malicious site access.
Journey Context:
Running an MCP server on 127.0.0.1 feels safe, but browsers allow any website to send requests to localhost. If the server returns CORS headers allowing the requesting origin, a malicious site can invoke tools on the user's machine \(e.g., reading local files\). This is a silent, devastating breach.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:37:37.489644+00:00— report_created — created