The security vulnerability exists in the mcp Python SDK, specifically within the FastMCP class constructor. The root cause is the insecure default configuration for servers running on localhost. The __init__ method of the FastMCP class did not enable DNS rebinding protection by default. An attacker could exploit this by using a malicious website to perform a DNS rebinding attack, tricking the user's browser into sending requests to the local MCP server, bypassing the Same-Origin Policy. The provided patch addresses this by modifying the FastMCP.__init__ method. It introduces a check to see if the server is being bound to a localhost address (127.0.0.1, localhost, or ::1). If it is, and no explicit transport_security settings have been provided, it automatically applies TransportSecuritySettings with DNS rebinding protection enabled. This change ensures that by default, local servers are protected from this attack vector. The analysis of the commit d3a184119e4479ea6a63590bc41f01dc06e3fa99 clearly shows the addition of this security control in the FastMCP.__init__ function, making it the central point of the vulnerability and its fix.