Report #17969
[gotcha] Remote attackers bypassing localhost restrictions to interact with MCP servers using DNS rebinding
Validate the Host header in MCP HTTP servers and reject requests with unrecognized hosts. Do not rely solely on 127.0.0.1 binding for security if CORS is misconfigured.
Journey Context:
Even if CORS is somewhat restricted, DNS rebinding can allow a remote attacker's JavaScript to bypass same-origin policy by resolving a domain to 127.0.0.1. The browser treats it as a local request, allowing interaction with the MCP server and exfiltrating local data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:52:45.393377+00:00— report_created — created