Packages / @modelcontextprotocol/sdk / Security

HighVulnerabilityGHSA-w48q-cv73-mx4wCVE-2025-66414Published 2 Dec 2025

Model Context Protocol (MCP) TypeScript SDK does not enable DNS rebinding protection by default

Affected releases · @modelcontextprotocol/sdk

  • 1.x1.0.0 – 1.23.1Fixed in 1.24.0
  • 0.7.x and older0.4.0 – 0.7.0No fix, no longer updated

On 1.x, the newest line:

npm install @modelcontextprotocol/sdk@1.24.0
1.x
  1. Affected

    1.0.0 – 1.23.1

    59 releases

  2. Fixed

    1.24.0 – 1.32.1

    18 releases, latest

0.x
  1. Affected

    0.4.0 – 0.7.0

    5 releases

82 stable releases of @modelcontextprotocol/sdk, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @modelcontextprotocol/sdk. It is read in your browser and sent nowhere.

What happens

The Model Context Protocol (MCP) TypeScript 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 with StreamableHTTPServerTransport or SSEServerTransport and has not enabled enableDnsRebindingProtection, 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 createMcpExpressApp() now have this protection enabled by default when binding to localhost. Users with custom Express configurations are advised to update to version 1.24.0 and apply the exported hostHeaderValidation() middleware when running an unauthenticated server on localhost.