CVE-2025-66416: Mcp Model Context Protocol (MCP) Python Vulnerability
HIGHCVE-2025-66416 is a HIGH model context protocol (mcp) python vulnerability (CWE-1188: Initialization of a Resource with an Insecure Default) affecting Mcp libraries in the PyPI ecosystem. The issue involves model context protocol (mcp) python sdk does not enable dns rebinding protection by default. Remediation is available by upgrading affected packages to version 1.23.0.
CVE-2025-66416 at a Glance
How to Fix CVE-2025-66416
To remediate this vulnerability, upgrade all affected Mcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mcp>=1.23.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mcp
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-66416, inspect your installed packages using pip:
pip show mcp
Analyze the terminal output to locate any version of Mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.23.0), your application is affected.
Note: The pip show mcp command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1188: Initialization of a Resource with an Insecure Default, where the product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure. In Mcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66416 Affected Mcp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mcp
|
PyPI |
< 1.23.0
|
1.23.0
|
References
Frequently Asked Questions
What is CVE-2025-66416?
Which Mcp versions are affected?
What version fixes CVE-2025-66416?
Is mcp affected?
What CWE is associated with CVE-2025-66416?
How can I check PyPI dependencies for CVE-2025-66416?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9h52-p55h-vw2f",
"modified" : "2026-07-16T18:30:59Z",
"published" : "2025-12-02T16:52:08Z",
"aliases" : [ "CVE-2025-66416" ],
"summary" : "Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default",
"details" : "### Description\n\nThe 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.\n\nNote 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.\n\nServers created via `FastMCP()` now have DNS rebinding protection enabled by default when the `host` parameter is `127.0.0.1` or `localhost`. Users are advised to update to version `1.23.0` to receive this automatic protection. Users with custom low-level server configurations using `StreamableHTTPSessionManager` or `SseServerTransport` directly should explicitly configure `TransportSecuritySettings` when running an unauthenticated server on localhost.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mcp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.23.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-9h52-p55h-vw2f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66416"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/python-sdk/commit/d3a184119e4479ea6a63590bc41f01dc06e3fa99"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-9h52-p55h-vw2f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/modelcontextprotocol/python-sdk"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mcp/PYSEC-2026-1617.yaml"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/mcp"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1188", "CWE-350" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-02T16:52:08Z",
"nvd_published_at" : "2025-12-02T19:15:52Z"
}
}