upgrade go-sdk to v1.3.1 to fix parser differential vulnerability#418
Merged
slimslenderslacks merged 1 commit intodocker:mainfrom Feb 19, 2026
Merged
Conversation
tuna-docker
previously approved these changes
Feb 19, 2026
545ef38 to
a718515
Compare
…bility This commit upgrades the modelcontextprotocol/go-sdk dependency from v1.2.0 to v1.3.1 to address a critical security vulnerability (Parser Differential) that allowed MCP message smuggling via case-insensitive JSON field matching. Changes: - Upgraded go-sdk from v1.2.0 to v1.3.1 in go.mod - Upgraded google/jsonschema-go from v0.3.0 to v0.4.2 (transitive) - Added security regression tests (pkg/security_test.go) Vulnerability Details: The vulnerability allowed attackers to bypass authorization by sending JSON messages with duplicate fields in different cases (e.g., "name" and "Name"). Go's standard json.Unmarshal is case-insensitive, causing capitalized fields to overwrite lowercase fields, enabling message smuggling attacks. Attack scenario: 1. Edge proxy validates lowercase "name" = "authorized-tool" ✓ 2. Attacker smuggles "Name" = "malicious-tool" in same message 3. Gateway's case-insensitive parsing overwrites with malicious value 4. Backend executes "malicious-tool" ✗ Authorization bypassed The Fix (go-sdk v1.3.1): - Introduces internal/json package using github.com/segmentio/encoding/json - Calls DontMatchCaseInsensitiveStructFields() for case-sensitive matching - All SDK unmarshaling now uses internaljson.Unmarshal - Complies with JSON-RPC 2.0 specification requirement for case-sensitivity - Blocks message smuggling attacks Security Tests: - TestMessageSmugglingVulnerability: Demonstrates the vulnerability - TestGoSDKv131Fix: Documents how the fix works - TestJSONRPC20Compliance: Verifies spec compliance - TestConfusedDeputyPrevention: Explains attack pattern - TestRegressionDocumentation: Comprehensive CVE documentation All tests pass, confirming the exploit is blocked after upgrade. Impact: ✓ Message smuggling attacks blocked ✓ JSON-RPC 2.0 spec compliance achieved ✓ Authorization bypass prevented ✓ All MCP message types protected (tools/call, prompts/get, resources/read)
a718515 to
caf4ff7
Compare
tuna-docker
approved these changes
Feb 19, 2026
saucow
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit upgrades the modelcontextprotocol/go-sdk dependency from v1.2.0 to v1.3.1 to address a critical security vulnerability (Parser Differential) that allowed MCP message smuggling via case-insensitive JSON field matching.
Changes:
Vulnerability Details:
The vulnerability allowed attackers to bypass authorization by sending JSON messages with duplicate fields in different cases (e.g., "name" and "Name"). Go's standard json.Unmarshal is case-insensitive, causing capitalized fields to overwrite lowercase fields, enabling message smuggling attacks.
Attack scenario:
The Fix (go-sdk v1.3.1):
Security Tests:
All tests pass, confirming the exploit is blocked after upgrade.
Impact:
✓ Message smuggling attacks blocked
✓ JSON-RPC 2.0 spec compliance achieved
✓ Authorization bypass prevented
✓ All MCP message types protected (tools/call, prompts/get, resources/read)
What I did
Related issue
(not mandatory) A picture of a cute animal, if possible in relation to what you did