NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MCP Go SDK

CVE-2026-33252: Cross-Site Tool Execution for HTTP Servers without Authorizatrion in github.com/modelcontextprotocol/go-sdk

highCVSS 3.1 7.1GHSA-89xv-2j6f-qhc8

The Streamable HTTP transport in the MCP Go SDK (github.com/modelcontextprotocol/go-sdk) up to and including 1.4.0 accepts cross-site POST requests from a browser. It checks neither the Origin header nor that Content-Type is application/json. A malicious web page can send MCP requests to a local server without authorization and may trigger tool execution. Fixed in v1.4.1, which needs Go 1.25 or later.

Published Mar 19, 2026 · Updated Mar 25, 2026 · Analysis Oct 31, 2026

What an attacker can do

Browsers allow a cross-site POST with Content-Type: text/plain without a CORS preflight, because that type is CORS-safelisted. The SDK's Streamable HTTP handler passed such requests to MCP message handling. The attacker does not need to read the response. The request alone can call a tool.

The risk is for MCP servers built on the Go SDK that run on a developer's machine or an internal network with no Authorization, especially in stateless or sessionless configurations where no session ID has to be known. The attacker hosts or compromises a web page. When someone with such a server running visits it, the page posts JSON-RPC tool calls to localhost.

What the attacker gets depends on the tools the server exposes: file reads, shell commands, database writes, or calls into other services. The CVSS vector rates integrity high and availability low, and it needs the user to visit the page (UI:R). Servers behind real authentication are not in the described scenario.

Who is affected

Go modules importing github.com/modelcontextprotocol/go-sdk at v1.4.0 or earlier that serve MCP over the Streamable HTTP transport. Servers that use only stdio are not reachable from a browser. Check your dependency:

go list -m github.com/modelcontextprotocol/go-sdk

Also check any MCP server binary you run that was built with the SDK, since the version is compiled in.

github.com/modelcontextprotocol/go-sdk

Ecosystem
Go
Affected
<= 1.4.0
Fixed in
1.4.1
Check
go list -m github.com/modelcontextprotocol/go-sdk

How to fix it

Upgrade to v1.4.1, which needs Go 1.25 or later:

go get github.com/modelcontextprotocol/[email protected]

The fix, in commit a433a83, validates that POST requests have Content-Type application/json. It also installs Go's http.CrossOriginProtection by default, with no trusted origins. You can supply your own protection through mcp.StreamableHTTPOptions to allow trusted origins. A temporary MCPGODEBUG setting disables the check and is slated for removal in v1.6.0, but the sources give two different names for it, so read the SDK docs before using it. Rebuild and redeploy binaries after upgrading.

How to tell if you were hit

Check the server's HTTP logs for POST requests to the MCP endpoint carrying an Origin header from a site that is not yours, or Content-Type text/plain. Look for tool calls in the server's own logs that no connected client issued. After upgrading, such requests should be rejected.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

The Go SDK's Streamable HTTP transport accepted browser-generated cross-site POST requests without validating the Origin header and without requiring Content-Type: application/json. In deployments without Authorization, especially stateless or sessionless configurations, this allows an arbitrary website to send MCP requests to a local server and potentially trigger tool execution.

Impact:

A malicious website may have been able to send cross-site POST requests with Content-Type: text/plain, which due to CORS-safelisted properties would reach the MCP message handling without any CORS preflight barrier.

Fix:

The SDK was modified to perform Content-Type header validation for POST requests and introduced a configurable protection for verifying the origin of the request in commit a433a83. Users are advised to update to v1.4.1 to use this additional protection.

Note: v1.4.1 requires Go 1.25 or later.

Credits:

Thank you to Lê Minh Quân for reporting the issue.

Credited to aleister1102.

Questions

Does CVE-2026-33252 affect stdio MCP servers?

The advisory concerns the Streamable HTTP transport. A browser cannot reach a stdio server, so the cross-site vector does not apply there.

Which version fixes it?

v1.4.1 of github.com/modelcontextprotocol/go-sdk. Versions up to and including 1.4.0 are affected. v1.4.1 requires Go 1.25 or later.

Why was a text/plain POST enough?

Browsers treat text/plain as CORS-safelisted and skip the preflight, so the request reached the MCP handler. The fix requires application/json and checks the Origin.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More MCP Go SDK vulnerabilities

All MCP Go SDK entries