A developer runs a Streamable HTTP MCP server locally. A malicious web page uses DNS rebinding to make the victim's browser send requests to it. Which server-side control does the transport specification require?
Select an answer to reveal the explanation.
Short Explanation
DNS rebinding tricks your browser into thinking a hostile site and your localhost are neighbours. The bouncer at the door is the Origin header check: wrong origin, you get a 403. Don't count on old session IDs, because they're not part of this revision.
Full Explanation
In a DNS rebinding attack, a remote page manipulates DNS so the victim's browser sends requests to a service on the local machine. The Streamable HTTP security warning lists three measures: servers must validate the Origin header on all incoming connections to prevent DNS rebinding, and if the Origin header is present and invalid they must respond with HTTP 403 Forbidden, optionally with a JSON-RPC error that has no id; local servers should bind only to 127.0.0.1 rather than all interfaces; and servers should authenticate all connections. Without these protections, attackers can use DNS rebinding to interact with local MCP servers from remote websites. Requiring Mcp-Session-Id fails because protocol sessions and that header are legacy; revision 2026-07-28 is stateless, and a session identifier was never an origin check. Returning 404 with -32601 for a missing protocol-version header fails by concept: 404 with -32601 is the response for an unknown method, and version-header handling addresses compatibility, not cross-site abuse. Restricting responses to text/event-stream fails because the response format has nothing to do with origin, and a rebinding attack makes the page appear same-origin. Exam caveat: the 403 rule applies when Origin is present and invalid. Operational check: send a POST with a foreign Origin and confirm a 403.