CVE-2025-66416 DNS Rebinding Protection Disabled by Default in Model Context Protocol Python SDK for Servers Running on Localhost
Attackers can use DNS rebinding to access local MCP servers if authentication is disabled, allowing unauthorized tool invocation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-66416?
CVE-2025-66416 is a high-severity server-side request forgery vulnerability in modelcontextprotocol python-sdk, published on 2 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The MCP Python SDK, called `mcp` on PyPI, is a Python implementation of the Model Context Protocol (MCP). Prior to version 1.23.0, tThe Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default for HTTP-based servers. When an HTTP-based MCP server is run on localhost without authentication using FastMCP with streamable HTTP or SSE transport, and has not configured TransportSecuritySettings, a malicious website could exploit DNS rebinding to bypass same-origin policy restrictions and send requests to the local MCP server. This could allow an attacker to invoke tools or access resources exposed by the MCP server on behalf of the user in those limited circumstances. Note that running HTTP-based MCP servers locally without authentication is not recommended per MCP security best practices. This issue does not affect servers using stdio transport. This vulnerability is fixed in 1.23.0.
Weakness: CWE-1188
Which versions are affected by CVE-2025-66416?
3 open source packages ship an affected version, including mcp. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mcp PyPI | All versions | 1.23.0 |
mcp PyPI | All versions | 1.23.0 |
mcp PyPI | All versions | 1.23.0 |
Products include Lfprojects Mcp Python Sdk.
How do I fix CVE-2025-66416?
Upgrade mcp to 1.23.0 or later.
Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.
Is CVE-2025-66416 being exploited?
There is no known exploitation of CVE-2025-66416 in the wild and no public exploit code.
Other vulnerabilities in modelcontextprotocol python-sdk
- CVE-2026-52870 MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks
- CVE-2026-59950 MCP Python SDK: WebSocket server transport does not support Host/Origin validation
- CVE-2026-52869 MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
Sources
Also known as GHSA-9h52-p55h-vw2f, PYSEC-2026-1617, ROOT-APP-PYPI-CVE-2025-66416.