Executive brief
The Model Context Protocol (MCP) Go SDK, used for building integrations between AI models and tools, contained a flaw in how it processed incoming messages. Because it used a standard Go library that ignores letter casing in data fields, it would accept messages that technically violate the protocol's rules. This could allow a malicious actor to bypass security filters or inspection tools that expect strictly formatted data, potentially leading to unauthorized actions or inconsistent security enforcement across different systems.
Technical details
The Go MCP SDK utilized the standard 'encoding/json.Unmarshal' library, which performs case-insensitive matching of JSON keys to struct field tags. This behavior violates the JSON-RPC 2.0 specification requiring exact field names and includes unexpected Unicode folding (e.g., matching 'paramſ' to 'params'). A remote attacker can send protocol messages with non-standard field casing to bypass intermediary inspection layers (like proxies or WAFs) that enforce exact-match policies. This also creates cross-implementation inconsistencies with TypeScript and Python SDKs which are case-sensitive. The issue was resolved in version 1.3.1 by migrating to a case-sensitive decoder.
Affected products
- modelcontextprotocol go-sdk < 1.3.1
Timeline
- 2026-02-18: patched: Case-sensitive decoder introduced in commit 7b8d81c
- 2026-02-25: advisory: GHSA-wvj2-96wp-fq3f published
- 2026-02-26: disclosed: CVE-2026-27896 published
References
- https://github.com/modelcontextprotocol/go-sdk/commit/7b8d81c264074404abdf5aa16e2cf0c2d9c64cc0
- https://github.com/modelcontextprotocol/go-sdk/security/advisories/GHSA-wvj2-96wp-fq3f
- https://access.redhat.com/security/cve/CVE-2026-27896
- https://bugzilla.redhat.com/show_bug.cgi?id=2442903
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27896.json