fix(deps): update module github.com/modelcontextprotocol/go-sdk to v1.4.1 [security]#798
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
Conversation
….4.1 [security] Generated by renovateBot
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
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 PR contains the following updates:
v1.4.0→v1.4.1GitHub Vulnerability Alerts
GHSA-q382-vc8q-7jhj
The Go SDK recently transitioned to the
segmentio/encodinglibrary for JSON parsing in version 1.3.1. While this change addressed both case-insensitivity and ASCII folding issues, the new parser implemented aggressive key matching that treated keys withnullUnicode characters appended at the end as equivalent to their base strings.Impact
When combined with duplicate keys, the described behavior leads to a "last key wins" resolution that could override the intended MCP message. This had the potential for:
Fix:
The
segmentio/encodingpackage was patched with a fix in segmentio/encoding@7d5a25d and a new version of the package was released (v0.5.4). The SDK switched to the patched version of the dependency in 724dd47aa. Users are advised to update to v1.4.1 to resolve this issue.Credits:
Thank you to Francesco Lacerenza (Doyensec) for reporting this issue.
Release Notes
modelcontextprotocol/go-sdk (github.com/modelcontextprotocol/go-sdk)
v1.4.1Compare Source
This release is a patch release for v1.4.0.
It contains cherry-picks for several security improvements. Security advisories will follow.
Fixes
Update of the
segmentio/encodingmodule versionThe JSON parsing library that was adopted to avoid attacks taking advantage of the Go's standard parser being case insensitive turned out to contain an issue itself. We have submitted the fix upstream and this release updates the dependency to the patched version.
Cross-origin requests protection
We have added additional protection against cross origin requests. From now on, we verify that
Content-Typefor JSON-RPCPOSTrequests is set toapplication/jsonand use the newhttp.CrossOriginProtectionfunctionality to verify the origin of the request. Usage of this functionality required increasing the required Go version to 1.25, which is in line with our Go version policy of supporting two newest Go versions. The behavior can be customized by passing a configuredhttp.CrossOriginProtectionobject toStreamableHTTPOptions.Since this is a behavior change, we introduced a compatibility parameter
disablecrossoriginprotectionthat will allow to temporarily disable it. It will be removed inv1.6.0version of the SDK. See here for more details about behavior changes and a history of compatibility parameters across SDK versions.Allowing customization of
http.Clientfor client-side OAuthWe have introduced an optional
http.Clientparameter toAuthorizationCodeHandlerConfig. This allows customization of the transport, for example implementing environment specific protection against Server-Side Request Forgery.Pull requests
Full Changelog: modelcontextprotocol/go-sdk@v1.4.0...v1.4.1
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.