# CVE-2026-34742: modelcontextprotocol go-sdk DNS rebinding in HTTP handlers

Source: https://junglewise.ai/threats/cve-2026-34742-modelcontextprotocol-go-sdk-dns-rebinding-in-http-handlers  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-02. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-34742 · Severity: high · CVSS 8.1 · Published 2026-04-02

The Model Context Protocol (MCP) Go SDK, used to build interfaces for AI models, was found to have insecure default settings when running servers on a local machine. A malicious website could trick a user's browser into sending unauthorized commands to a local MCP server, potentially allowing attackers to access private data or execute tools on the user's behalf. This risk primarily affects developers or users running these servers locally without additional authentication.

Technologies: [github.com/modelcontextprotocol/go-sdk (Go)](https://junglewise.ai/threats/technologies/github-com-modelcontextprotocol-go-sdk). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Lfprojects](https://junglewise.ai/threats/vendors/lfprojects).

## Quick answers

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

**How severe is CVE-2026-34742?** High severity, with a CVSS score of 8.1, published 2 April 2026.

**Which products and versions are affected?** github.com/modelcontextprotocol/go-sdk (Go) < 1.4.0, SEMVER:introduced=0,fixed=1.4.0.

**Is there a fix for CVE-2026-34742?** Yes. github.com/modelcontextprotocol/go-sdk (Go): upgrade to 1.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2026-34742?** Check whether you run github.com/modelcontextprotocol/go-sdk (Go) or Lfprojects Mcp Go Sdk 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

- github.com/modelcontextprotocol/go-sdk (Go): upgrade to 1.4.0 or later

  ```sh
  go get github.com/modelcontextprotocol/go-sdk@v1.4.0
  ```


## Technical details

The Model Context Protocol (MCP) Go SDK is vulnerable to DNS rebinding attacks because it lacks default protection for HTTP-based servers using StreamableHTTPHandler or SSEHandler when bound to localhost. An attacker can exploit this by enticing a user to visit a malicious website, which then uses DNS rebinding to bypass the browser's Same-Origin Policy (SOP) and interact with the local MCP server. If the server is running without authentication, the attacker can invoke exposed tools or access resources. This issue does not affect servers using stdio transport. The vulnerability is addressed in version 1.4.0, which enables DNS rebinding protection by default for localhost bindings.

## Affected products

- Model Context Protocol (MCP) go-sdk < 1.4.0

## Identifiers

- CVE-2026-34742
- GHSA-xw59-hvm2-8pj6
- GO-2026-5771

## Timeline

- 2026-03-30: disclosed
- 2026-04-01: advisory: GitHub Advisory published
- 2026-04-02: other: NVD published

## 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

- [GO-2026-4770 - Improper handling of null Unicode character when parsing JSON in github.com/modelcontextprotocol/go-sdk](https://junglewise.ai/threats/go-2026-4770-improper-handling-of-null-unicode-character-when-parsing-6cff319e)
- [GO-2026-4773 - Cross-Site Tool Execution for HTTP Servers without Authorizatrion in github.com/modelcontextprotocol/go-sdk](https://junglewise.ai/threats/cve-2026-33252-cross-site-tool-execution-for-http-servers-without-authorizatrion)
- [Improper handling of null Unicode character when parsing JSON in github.com/modelcontextprotocol/go-sdk](https://junglewise.ai/threats/improper-handling-of-null-unicode-character-when-parsing-json-in-github-27191820)
- [Model Context Protocol Go SDK improper case sensitivity in JSON-RPC parsing](https://junglewise.ai/threats/cve-2026-27896-model-context-protocol-go-sdk-improper-case-sensitivity-in-json)
