# CVE-2026-34742: Model Context Protocol Go SDK: DNS Rebinding Protection Disabled by Default for Servers Running on Localhost

> Attackers can bypass same-origin policy via DNS rebinding to interact with local MCP servers, potentially invoking tools or accessing resources.

- **Severity:** High 7.6 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 2 Apr 2026
- **Updated:** 15 Jul 2026
- **Also known as:** CLEANSTART-2026-BU71031, CLEANSTART-2026-GU11984, GHSA-xw59-hvm2-8pj6, GO-2026-5771, MINI-35w4-5mqf-x5vp, MINI-p8vf-7524-pc7x

## What is CVE-2026-34742?

CVE-2026-34742 is a high-severity server-side request forgery vulnerability in modelcontextprotocol go-sdk, published on 2 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The Go MCP SDK used Go's standard encoding/json. Prior to version 1.4.0, the Model Context Protocol (MCP) Go 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 StreamableHTTPHandler or SSEHandler, 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. This issue has been patched in version 1.4.0.

Weakness: CWE-1188 (Initialization of a Resource with an Insecure Default)

## Which versions are affected by CVE-2026-34742?

3 open source packages ship an affected version, including github.com/modelcontextprotocol/go-sdk. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/modelcontextprotocol/go-sdk` | Go | All versions | 1.4.0 |
| `github.com/modelcontextprotocol/go-sdk` | Go | All versions | 1.4.0 |
| `github.com/modelcontextprotocol/go-sdk` | Go | All versions | 1.4.0 |

Products: Lfprojects Mcp Go Sdk.

## How do I fix CVE-2026-34742?

Upgrade github.com/modelcontextprotocol/go-sdk to 1.4.0 or later.

## Is CVE-2026-34742 being exploited?

There is no known exploitation of CVE-2026-34742 in the wild and no public exploit code.

## Other vulnerabilities in modelcontextprotocol go-sdk

- [CVE-2026-33252](https://insights.sbomify.com/CVE-2026-33252/): MCP Go SDK Allows Cross-Site Tool Execution for HTTP Servers without Authorizatrion (high 7.1)
- [CVE-2026-27896](https://insights.sbomify.com/CVE-2026-27896/): MCP Go SDK Vulnerable to Improper Handling of Case Sensitivity (high 7.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-34742 and fix it if it is affected.

What it is: CVE-2026-34742 is a high-severity server-side request forgery vulnerability in modelcontextprotocol go-sdk, published on 2 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-34742 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/modelcontextprotocol/go-sdk (Go): affected all versions; fixed in 1.4.0
- github.com/modelcontextprotocol/go-sdk (Go): affected all versions; fixed in 1.4.0
- github.com/modelcontextprotocol/go-sdk (Go): affected all versions; fixed in 1.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-34742/ (Markdown: https://insights.sbomify.com/CVE-2026-34742/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-34742
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-34742
- OSV: https://osv.dev/vulnerability/CVE-2026-34742

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-34742/
Summaries are generated and may contain mistakes; the official description above is the record.
