# CVE-2025-66416: Model Context Protocol Python SDK DNS rebinding in HTTP servers

Source: https://junglewise.ai/threats/cve-2025-66416-model-context-protocol-python-sdk-dns-rebinding-in-http-servers  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-12-02. Updated: 2026-07-16  
License: CC BY 4.0 with a link back

CVE-2025-66416 · Severity: high · CVSS 8.1 · Published 2025-12-02

The Model Context Protocol (MCP) Python SDK, used to build interfaces for AI models, contains a vulnerability that could allow malicious websites to interact with AI tools running on a user's local computer. If a developer runs an unauthenticated local server, an attacker could trick the user's browser into sending commands to that server, potentially accessing private data or executing unauthorized actions. This risk is primarily present when using the library's web-based transport features without additional security configurations.

Technologies: [Anthropic Model Context Protocol](https://junglewise.ai/threats/technologies/model-context-protocol), [mcp (PyPI)](https://junglewise.ai/threats/technologies/pypi-mcp). Vendors: [Anthropic](https://junglewise.ai/threats/vendors/anthropic), [Lfprojects](https://junglewise.ai/threats/vendors/lfprojects), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-66416 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-66416 being exploited in the wild.

**How severe is CVE-2025-66416?** High severity, with a CVSS score of 8.1, published 2 December 2025.

**Which products and versions are affected?** Anthropic Model Context Protocol < 1.23.0; mcp (PyPI) ECOSYSTEM:introduced=0,fixed=1.23.0.

**Is there a fix for CVE-2025-66416?** Yes. mcp (PyPI): upgrade to 1.23.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-66416 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-66416?** Check whether you run Anthropic Model Context Protocol, Lfprojects Mcp Python Sdk or mcp (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mcp (PyPI): upgrade to 1.23.0 or later

  ```sh
  pip install "mcp>=1.23.0"
  ```


## Technical details

The MCP Python SDK is vulnerable to DNS rebinding attacks because it lacks default protection for HTTP-based servers (specifically those using FastMCP with streamable HTTP or SSE transport). When a server is hosted on localhost without authentication or explicit TransportSecuritySettings, a remote attacker can use DNS rebinding to bypass the browser's Same-Origin Policy (SOP). This allows the attacker to send arbitrary requests to the local MCP server, potentially invoking tools or accessing resources on behalf of the user. The vulnerability is addressed in version 1.23.0, which enables DNS rebinding protection by default for localhost/127.0.0.1 addresses.

## Affected products

- Model Context Protocol (MCP) mcp < 1.23.0

## Identifiers

- CVE-2025-66416
- GHSA-9h52-p55h-vw2f
- PYSEC-2026-1617

## Timeline

- 2025-12-02: disclosed
- 2025-12-02: patched: Fixed in version 1.23.0
- 2025-12-02: advisory

## References

- [https://api.github.com/users/JLLeitschuh](https://api.github.com/users/JLLeitschuh)
- [https://github.com/JLLeitschuh](https://github.com/JLLeitschuh)
- [https://api.github.com/users/JLLeitschuh/gists%7B/gist_id%7D](https://api.github.com/users/JLLeitschuh/gists%7B/gist_id%7D)
- [https://api.github.com/users/JLLeitschuh/repos](https://api.github.com/users/JLLeitschuh/repos)
- [https://avatars.githubusercontent.com/u/1323708?v=4](https://avatars.githubusercontent.com/u/1323708?v=4)
- [https://api.github.com/users/JLLeitschuh/events%7B/privacy%7D](https://api.github.com/users/JLLeitschuh/events%7B/privacy%7D)

## Related threats

- [Model Context Protocol Python SDK unvalidated $ref fetching](https://junglewise.ai/threats/cve-2026-116686-the-model-context-protocol-python-sdk-is-the-official-python-sdk)
- [Model Context Protocol Python SDK credential and body leak on cross-origin redirects](https://junglewise.ai/threats/cve-2026-116685-the-model-context-protocol-python-sdk-is-the-official-python-sdk)
- [Model Context Protocol Python SDK token resource confusion in bearer authentication](https://junglewise.ai/threats/cve-2026-116684-the-model-context-protocol-python-sdk-is-the-official-python-sdk)
- [MCP Python SDK unbounded session accumulation in StreamableHTTP](https://junglewise.ai/threats/cve-2026-59951-mcp-python-sdk-unbounded-session-accumulation-in-streamablehttp)
- [RMCP Streamable HTTP server unauthenticated session-table memory leak](https://junglewise.ai/threats/cve-2026-63128-rmcp-streamable-http-server-unauthenticated-session-table-memory)
