DNS Rebinding Protection Disabled by Default in Model Context Protocol Python SDK for Servers Running on Localhost
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
mcpPyPI | < 1.23.0 | 1.23.0 |
Affected products
10- osv-coords9 versionspkg:apk/chainguard/open-webuipkg:apk/chainguard/open-webui-compatpkg:apk/chainguard/py3-semgreppkg:apk/chainguard/semgreppkg:apk/wolfi/open-webuipkg:apk/wolfi/open-webui-compatpkg:apk/wolfi/py3-semgreppkg:apk/wolfi/semgreppkg:pypi/mcp
< 0.6.40-r1+ 8 more
- (no CPE)range: < 0.6.40-r1
- (no CPE)range: < 0.6.40-r1
- (no CPE)range: < 1.145.0-r0
- (no CPE)range: < 1.145.0-r0
- (no CPE)range: < 0.6.40-r1
- (no CPE)range: < 0.6.40-r1
- (no CPE)range: < 1.145.0-r0
- (no CPE)range: < 1.145.0-r0
- (no CPE)range: < 1.23.0
- Range: < 1.23.0
Patches
Vulnerability mechanics
References
4- github.com/advisories/GHSA-9h52-p55h-vw2fghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-66416ghsaADVISORY
- github.com/modelcontextprotocol/python-sdk/commit/d3a184119e4479ea6a63590bc41f01dc06e3fa99ghsax_refsource_MISCWEB
- github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-9h52-p55h-vw2fghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.