Report #57214
[gotcha] Local MCP server running on localhost trusts all local origins
Validate the Origin header strictly and implement proper CORS policies on local MCP servers. Do not bind to 0.0.0.0 unless necessary.
Journey Context:
Developers assume localhost is safe. If a local MCP server \(like a file system server\) doesn't check the Origin header, a malicious website visited by the user can send fetch requests to http://localhost:PORT and execute tools. This is a classic DNS rebinding/CORS bypass that silently exposes local resources to the internet.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:31:24.538812+00:00— report_created — created