Skip to content
Heist/ feed
Back to feed
High

DNS Rebinding Protection Disabled by Default in Model Context Protocol Python SDK for Servers Running on Localhost

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-66416
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 02:30 UTC · Revision 1

Source evidence

DNS Rebinding Protection Disabled by Default in Model Context Protocol Python SDK for Servers Running on Localhost

core-osv · Original source

Published 2 Dec 2025, 18:14 UTC

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.

osv:CVE-2025-66416
Complete source record
{
  "id": "e90f8dac9898b43fe4721d427b690d3596661d131749672a261da0e7a83a6ae2",
  "url": "https://osv.dev/vulnerability/CVE-2025-66416",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DNS Rebinding Protection Disabled by Default in Model Context Protocol Python SDK for Servers Running on Localhost",
    "summary": "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.",
    "evidence": "osv:CVE-2025-66416",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-66416",
      "aliases": [
        "CVE-2025-66416",
        "GHSA-9h52-p55h-vw2f",
        "PYSEC-2026-1617"
      ],
      "metrics": [
        {
          "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": [
        {
          "ranges": [
            {
              "repo": "https://github.com/modelcontextprotocol/python-sdk",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d3a184119e4479ea6a63590bc41f01dc06e3fa99"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.23.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d3a184119e4479ea6a63590bc41f01dc06e3fa99"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "cpe": "cpe:2.3:a:lfprojects:mcp_python_sdk:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.23.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.22.0",
            "v1.21.1",
            "v1.21.0",
            "v1.20.0",
            "v1.19.0",
            "v1.18.0",
            "v1.17.0",
            "v1.16.0",
            "v1.15.0",
            "1.15.0",
            "v1.14.1",
            "v1.14.0",
            "v1.13.1",
            "v1.13.0",
            "v1.12.4",
            "v1.12.3",
            "v1.12.2",
            "v1.12.1",
            "v1.12.0",
            "v1.11.0",
            "v1.10.1",
            "v1.10.0",
            "v1.9.4",
            "v1.9.3",
            "v1.9.2",
            "v1.9.1",
            "v1.9.0",
            "v1.8.1",
            "v1.8.0",
            "v1.7.0",
            "v1.6.0",
            "v1.5.0",
            "v1.4.1",
            "v1.4.0",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-66416.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:45.979146038Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66416.json",
        "https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-9h52-p55h-vw2f",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-66416",
        "https://github.com/modelcontextprotocol/python-sdk/commit/d3a184119e4479ea6a63590bc41f01dc06e3fa99"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1188"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66416.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-66416",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514288,
  "published_at": "2025-12-02T18:14:28.31+00:00"
}