Vulnerabilities in pkg:golang/github.com/modelcontextprotocol/go-sdk

PACKAGE
Advisory Identifier: GHSA-xw59-hvm2-8pj6
Advisory Summary

CVE-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.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/modelcontextprotocol/go-sdk

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/modelcontextprotocol/go-sdk. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xw59-hvm2-8pj6 CVE-2026-34742 HIGH DNS Rebinding Protection Disabled by Default in Model Context Protocol Go SDK for Servers Running on Localhost
GHSA-89xv-2j6f-qhc8 CVE-2026-33252 HIGH Cross-Site Tool Execution for HTTP Servers without Authorizatrion in github.com/modelcontextprotocol/go-sdk
GHSA-q382-vc8q-7jhj - HIGH Improper handling of null Unicode character when parsing JSON in github.com/modelcontextprotocol/go-sdk
GHSA-wvj2-96wp-fq3f CVE-2026-27896 HIGH MCP Go SDK Vulnerable to Improper Handling of Case Sensitivity

CVE-2026-34742 at a Glance

CVE Identifier CVE-2026-34742
GHSA Identifier GHSA-xw59-hvm2-8pj6
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-1188: Initialization of a Resource with an Insecure Default
Affected Product Github.com/modelcontextprotocol/go sdk
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

github.com/modelcontextprotocol/go-sdk fixed: 1.4.0
Upgrade github.com/modelcontextprotocol/go-sdk to 1.4.0
Verify Direct and Transitive Dependencies

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

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. 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 `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.

CVE-2026-34742 Affected Github.com/modelcontextprotocol/go sdk Versions

1 component(s)
Fixed Versions:
1.4.0
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?
CVE-2026-34742 is a security vulnerability in Github.com/modelcontextprotocol/go sdk involving DNS Rebinding Protection Disabled by Default in Model Context Protocol Go SDK for Servers Running on Localhost under CWE-1188: Initialization of a Resource with an Insecure Default.
Which Github.com/modelcontextprotocol/go sdk versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: github.com/modelcontextprotocol/go-sdk.
What version fixes CVE-2026-34742?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/modelcontextprotocol/go-sdk affected?
Yes, github.com/modelcontextprotocol/go-sdk is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What is the CVSS score of CVE-2026-34742?
CVE-2026-34742 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-34742?
CVE-2026-34742 is classified under CWE-1188: Initialization of a Resource with an Insecure Default (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.).
How can I check Go dependencies for CVE-2026-34742?
Run the dependency tree command: 'inspect dependencies for github.com/modelcontextprotocol/go-sdk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}