CVE-2026-34742: Github.com/modelcontextprotocol/go sdk DNS Rebinding Protection Disabled By Vulnerability
HIGHCVE-2026-34742 is a HIGH (CVSS 8.1) dns rebinding protection disabled by vulnerability (CWE-1188: Initialization of a Resource with an Insecure Default) affecting Github.com/modelcontextprotocol/go sdk libraries in the Go ecosystem. The issue involves dns rebinding protection disabled by default in model context protocol go sdk for servers running on localhost. Remediation is available by upgrading affected packages to version 1.4.0.
CVE-2026-34742 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-34742
To remediate this vulnerability, upgrade all affected Github.com/modelcontextprotocol/go sdk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/modelcontextprotocol/go-sdk to 1.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/modelcontextprotocol/go-sdk
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-34742, inspect your project dependencies for Github.com/modelcontextprotocol/go sdk:
inspect dependencies for github.com/modelcontextprotocol/go-sdk
Analyze the terminal output to locate any version of Github.com/modelcontextprotocol/go sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1188: Initialization of a Resource with an Insecure Default, where the product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure. In Github.com/modelcontextprotocol/go sdk, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34742 Affected Github.com/modelcontextprotocol/go sdk Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/modelcontextprotocol/go-sdk
|
Go |
< 1.4.0
|
1.4.0
|
References
Frequently Asked Questions
What is CVE-2026-34742?
Which Github.com/modelcontextprotocol/go sdk versions are affected?
What version fixes CVE-2026-34742?
Is github.com/modelcontextprotocol/go-sdk affected?
What is the CVSS score of CVE-2026-34742?
What CWE is associated with CVE-2026-34742?
How can I check Go dependencies for CVE-2026-34742?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xw59-hvm2-8pj6",
"modified" : "2026-07-21T14:58:57Z",
"published" : "2026-04-01T21:09:09Z",
"aliases" : [ "CVE-2026-34742" ],
"summary" : "DNS Rebinding Protection Disabled by Default in Model Context Protocol Go SDK for Servers Running on Localhost",
"details" : "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.\n\nNote 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.\n\nServers created via `StreamableHTTPHandler` or `SSEHandler` now have this protection enabled by default when binding to `localhost`. Users are advised to update to version `1.4.0` to receive this automatic protection.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/modelcontextprotocol/go-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/go-sdk/security/advisories/GHSA-xw59-hvm2-8pj6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34742"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/go-sdk/pull/760"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/go-sdk/commit/67bd3f2e2b53ce11a16db8d976cdb8ff1e986b6d"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:21772"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2026-34742"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2454608"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/modelcontextprotocol/go-sdk"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.4.0"
}, {
"type" : "WEB",
"url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34742.json"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1188" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-01T21:09:09Z",
"nvd_published_at" : "2026-04-02T19:21:33Z"
}
}