CVE-2026-27896: MCP Go SDK Vulnerable to Improper Handling of Case Sensitivity
The MCP Go SDK before 1.3.1 parsed JSON-RPC messages with Go's standard JSON decoder, which matches field names without regard to case. A malicious MCP peer can send altered field names that the SDK accepts and a proxy may miss. Upgrade to v1.3.1.
Published Feb 26, 2026 · Analysis Nov 23, 2026
What an attacker can do
Go's encoding/json matches keys to struct tags case-insensitively. A field tagged method also matches Method or METHOD. It also folds two Unicode characters, the long s (U+017F) and the Kelvin sign (U+212A), to s and k, so a key spelled with the long s still matches params. JSON-RPC 2.0 defines exact field names, so the SDK accepted messages the specification does not allow.
The attacker is a malicious MCP peer. A proxy, gateway or policy layer between client and server that inspects exact field names can fail to see such a message, while the Go SDK still acts on it. The TypeScript and Python MCP SDKs parse case-sensitively and would reject it, which creates a gap between implementations. The advisory describes this as a possible bypass of inspection. It rates it high (CVSS 4.0 score 7.0) with an impact on subsequent systems.
Who is affected
The Go module github.com/modelcontextprotocol/go-sdk before v1.3.1. Programs that build MCP clients or servers with it are affected, and the risk is highest where a filtering proxy sits in front. Check:
go list -m github.com/modelcontextprotocol/go-sdkgithub.com/modelcontextprotocol/go-sdk
- Ecosystem
- Go
- Affected
- < 1.3.1
- Fixed in
- 1.3.1
- Check
go list -m github.com/modelcontextprotocol/go-sdk
How to fix it
Upgrade to v1.3.1:
go get github.com/modelcontextprotocol/[email protected]The fix, commit 7b8d81c, replaces the standard JSON decoder with the case-sensitive github.com/segmentio/encoding. Rebuild and redeploy your binaries. The advisory names no workaround.
How to tell if you were hit
Log or capture raw MCP messages at your proxy and look for JSON-RPC keys that are not exactly lowercase as the specification says, such as Method or Params, or keys with the Unicode characters named above. The advisory gives no other indicator.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
The Go MCP SDK used Go's standard encoding/json.Unmarshal for JSON-RPC and MCP protocol message parsing. Go's standard library performs case-insensitive matching of JSON keys to struct field tags — a field tagged json:"method" would also match "Method", "METHOD", etc. Additionally, Go's standard library folds the Unicode characters ſ (U+017F) and K (U+212A) to their ASCII equivalents s and k, meaning fields like "paramſ" would match "params". This violated the JSON-RPC 2.0 specification, which defines exact field names.
Impact:
A malicious MCP peer may have been able to send protocol messages with non-standard field casing (e.g., "Method" instead of "method") that the SDK would silently accept. This had the potential for:
- Bypassing intermediary inspection: Proxies or policy layers that matched on exact field names may have failed to detect or filter these messages.
- Cross-implementation inconsistency: Other MCP SDKs (TypeScript, Python) use case-sensitive parsing and would reject the same messages, creating potential security-boundary confusion.
Fix:
Go's standard JSON unmarshaling was replaced with a case-sensitive decoder (github.com/segmentio/encoding) in commit 7b8d81c. Users are advised to update to v1.3.1 to resolve this issue.
Credits:
MCP Go SDK thanks Francesco Lacerenza (Doyensec) for reporting this issue.
Credited to anaximand3r.
Questions
- Which version of the MCP Go SDK fixes CVE-2026-27896?
v1.3.1. It replaces the standard JSON decoder with a case-sensitive one.
- Does it give code execution?
The advisory does not claim it. The risk is that messages with non-standard field names get past proxies or policy layers that match exact names, while the SDK still accepts them.
- Are the TypeScript and Python MCP SDKs affected?
The advisory says they parse case-sensitively and would reject the same messages. The flaw is in the Go SDK.
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 entriesCVE-2026-34742
DNS Rebinding Protection Disabled by Default in Model Context Protocol Go SDK for Servers Running on Localhost
high8.1Apr 1, 2026CVE-2026-33252
Cross-Site Tool Execution for HTTP Servers without Authorizatrion in github.com/modelcontextprotocol/go-sdk
high7.1Mar 19, 2026GHSA-q382-vc8q-7jhj
Improper handling of null Unicode character when parsing JSON in github.com/modelcontextprotocol/go-sdk
high8.2Mar 19, 2026
