CVE-2025-66416
JSON

7.6high

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

Severity
7.6high CVSS:4.0 by GitHub_M
Exploit likelihood
0.54% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9h52-p55h-vw2fPYSEC-2026-1617

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.

Affected

Product or packageVersionsReported by
modelcontextprotocol python-sdk< 1.23.0CVE List
mcp (PyPI)before 1.23.0GitHub Advisory Database, PyPA Advisory Database
lfprojects mcp_python_sdkbefore 1.23.0NVD

All scores

GitHub_M7.6high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Classification

CWE-350CWE-1188

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
Description

The 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.

Servers 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.

NVD (es)

El SDK de Python de MCP, llamado 'mcp' en PyPI, es una implementación en Python del Protocolo de Contexto del Modelo (MCP). Versiones anteriores a la 1.23.0, el SDK de Python del Protocolo de Contexto del Modelo (MCP) no habilita la protección contra la reconfiguración de DNS (DNS rebinding) por defecto para servidores basados en HTTP. Cuando un servidor MCP basado en HTTP se ejecuta en localhost sin autenticación usando FastMCP con transporte HTTP o SSE en streaming, y no ha configurado TransportSecuritySettings, un sitio web malicioso podría explotar la reconfiguración de DNS (DNS rebinding) para eludir las restricciones de la política de mismo origen y enviar solicitudes al servidor MCP local. Esto podría permitir a un atacante invocar herramientas o acceder a recursos expuestos por el servidor MCP en nombre del usuario en esas circunstancias limitadas. Tenga en cuenta que ejecutar servidores MCP basados en HTTP localmente sin autenticación no se recomienda según las mejores prácticas de seguridad de MCP. Este problema no afecta a los servidores que utilizan transporte stdio. Esta vulnerabilidad está corregida en la versión 1.23.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-66416 changed 2025-12-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-9h52-p55h-vw2f changed 2026-09-10CC-BY-4.0
NVDCVE-2025-66416 changed 2026-10-18Public domain
PyPA Advisory DatabasePYSEC-2026-1617 changed 2026-07-07CC-BY-4.0