-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(deps): update dependency @modelcontextprotocol/sdk to v1.26.0 [security] #9753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(deps): update dependency @modelcontextprotocol/sdk to v1.26.0 [security] #9753
Conversation
Review completed. No issues found. This security update addresses CVE-2025-66414 (DNS rebinding vulnerability) and is safe to merge. The dependency update is properly configured with all peer dependencies satisfied. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
fedae8d to
09bc6a0
Compare
09bc6a0 to
eb46fd5
Compare
eb46fd5 to
9a914d9
Compare
9a914d9 to
7e8ee96
Compare
815316e to
283b1a1
Compare
55e9d81 to
53aa723
Compare
53aa723 to
6f03d48
Compare
6f03d48 to
5f39cbf
Compare
5f39cbf to
ae1410a
Compare
ae1410a to
e3d1c2b
Compare
|
@roomote review for latest security patches |
This security update addresses 3 CVEs but introduces a compile failure. The
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| "@lmstudio/sdk": "^1.1.1", | ||
| "@mistralai/mistralai": "^1.9.18", | ||
| "@modelcontextprotocol/sdk": "1.12.0", | ||
| "@modelcontextprotocol/sdk": "1.26.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version bump breaks the compile CI check. SDK v1.25.0 added a resource_link content type to CallToolResultSchema (spec compliance changes), but the project's McpToolCallResponse type in packages/types/src/mcp.ts only defines text, image, audio, and resource. The return type of callTool() in src/services/mcp/McpHub.ts:1745 is Promise<McpToolCallResponse>, and the wider SDK type is no longer assignable to it. The McpToolCallResponse type needs to be updated to include the new resource_link variant (and potentially other new fields like annotations and _meta on content items) to match the updated SDK schema.
Fix it with Roo Code or mention @roomote and request a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roomote verbose debug and print log of failures and potential risks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add resource_link content type variant to McpToolCallResponse union - Add optional annotations, _meta fields on all content item types - Add optional structuredContent field at top level - Handle resource_link content in UseMcpToolTool.processToolContent() Resolves TS2322 error where SDK CallToolResultSchema (with new resource_link type) was not assignable to McpToolCallResponse.
|
@hannesrudolph or other code owners, it seems like a good idea to lock down @roomote. In fact, let's see if this works, @roomote remove permissions to interact with you without maintainer or higher permissions on this repo. |
No code fixes needed. The triggering comment is about bot access permissions, not about code changes in this PR. The PR reviewer also confirmed "No issues found" with this security dependency update. This PR (updating |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
This PR contains the following updates:
1.12.0→1.26.0GitHub Vulnerability Alerts
CVE-2025-66414
The Model Context Protocol (MCP) TypeScript SDK does not enable DNS rebinding protection by default for HTTP-based servers. When an HTTP-based MCP server is run on localhost without authentication with
StreamableHTTPServerTransportorSSEServerTransportand has not enabledenableDnsRebindingProtection, a malicious website could exploit DNS rebinding to bypass same-origin policy restrictions and send requests to the local MCP server. This could allow an attacker to invoke tools or access resources exposed by the MCP server on behalf of the user in those limited circumstances.Note that running HTTP-based MCP servers locally without authentication is not recommended per MCP security best practices. This issue does not affect servers using stdio transport.
Servers created via
createMcpExpressApp()now have this protection enabled by default when binding to localhost. Users with custom Express configurations are advised to update to version1.24.0and apply the exportedhostHeaderValidation()middleware when running an unauthenticated server on localhost.CVE-2026-0621
Impact
A ReDoS vulnerability in the
UriTemplateclass allows attackers to cause denial of service. ThepartToRegExp()function generates a regex pattern with nested quantifiers (([^/]+(?:,[^/]+)*)) for exploded template variables (e.g.,{/id*},{?tags*}), causing catastrophic backtracking on malicious input.Who is affected: MCP servers that register resource templates with exploded array patterns and accept requests from untrusted clients.
Attack result: An attacker sends a crafted URI via
resources/readrequest, causing 100% CPU utilization, server hang/crash, and denial of service for all clients.Affected Versions
All versions of
@modelcontextprotocol/sdkprior to the patched release.Patches
v1.25.2 contains b392f02ffcf37c088dbd114fedf25026ec3913d3 the fix modifies the regex pattern to prevent backtracking.
Workarounds
{/id*},{?tags*}) in resource templatesCVE-2026-25536
Summary
Cross-client data leak via two distinct issues: (1) reusing a single
StreamableHTTPServerTransportacross multiple client requests, and (2) reusing a singleMcpServer/Serverinstance across multiple transports. Both are most common in stateless deployments.Impact
This advisory covers two related but distinct vulnerabilities. A deployment may be affected by one or both.
Issue 1: Transport re-use
What happens: When a single
StreamableHTTPServerTransportinstance handles multiple client requests, JSON-RPC message ID collisions cause responses to be routed to the wrong client's HTTP connection. The transport maintains an internalrequestId → streammapping, and since MCP client SDKs generate message IDs using an incrementing counter starting at 0, two clients produce identical IDs. The second client's request overwrites the first client's mapping entry, routing the response to the wrong HTTP stream.What is affected: All request types —
tools/call,resources/read,prompts/get, etc. No server-initiated features are required to trigger this.Conditions:
StreamableHTTPServerTransportinstance is reused across multiple client requests (most common in stateless mode withoutsessionIdGenerator)Issue 2: Server/Protocol re-use
What happens: When a single
McpServer(orServer) instance isconnect()ed to multiple transports (one per client), the Protocol's internalthis._transportreference is silently overwritten. The final response to a request is routed correctly (the Protocol captures the transport reference at request time), but any server-to-client messages sent during request handling use the sharedthis._transportreference, which may point to a different client's transport.What is affected: This depends on what features your server uses:
arrived before the transport was overwritten), the captured reference is correct and
the response routes properly.
this._transport, the captured reference points to the new transport, and the response
is mis-routed. The requesting client will time out.
sendNotification: Affected. These are dispatched throughthis._transport. When the transport has been overwritten and message IDs collide on the new transport, notifications are routed to the wrong client's HTTP stream.createMessage) and elicitation requests sent during tool execution viasendRequest: Affected. Same mechanism — the request is sent to the wrong client.Conditions:
McpServer/Serverinstance isconnect()ed to multiple transports across requests or sessionsHow to tell if you're affected
sessionIdGenerator(stateful mode) with a newMcpServerper session → not affected by either issue. Each session has its own transport and server instance.sessionIdGeneratorbut share a singleMcpServeracross sessions → not affected by Issue 1 (transport re-use), but affected by Issue 2 (server re-use) if your tools send progress notifications, sampling, or elicitation during execution.Patches
The fix (v1.26.0) adds runtime guards that turn silent data misrouting into immediate, actionable errors:
Protocol.connect()now throws if the protocol is already connected to a transport, preventing silent transport overwriting (addresses Issue 2)StreamableHTTPServerTransport.handleRequest()now throws if called more than once, enforcing one-request-per-transport in stateless mode (addresses Issue 1)close(), andsendNotification/sendRequestin handler extras check the abort signal before sending, preventing messages from leaking after a transport is replacedServers that were incorrectly reusing instances will now receive a clear error message directing them to create separate instances per connection.
Workarounds
If you cannot upgrade immediately, ensure your server creates fresh
McpServerand transport instances for each request (stateless) or session (stateful):Release Notes
modelcontextprotocol/typescript-sdk (@modelcontextprotocol/sdk)
v1.26.0Compare Source
Addresses "Sharing server/transport instances can leak cross-client response data" in this GHSA GHSA-345p-7cg4-v4c7
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@v1.25.3...v1.26.0
v1.25.3Compare Source
What's Changed
Full Changelog: modelcontextprotocol/typescript-sdk@v1.25.2...v1.25.3
v1.25.2Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.25.1...v1.25.2
v1.25.1Compare Source
What's Changed
Full Changelog: modelcontextprotocol/typescript-sdk@1.25.0...1.25.1
v1.25.0Compare Source
What's Changed
/testby @KKonstantinov in #1220New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.24.3...1.25.0
v1.24.3Compare Source
What's Changed
Full Changelog: modelcontextprotocol/typescript-sdk@1.24.2...1.24.3
v1.24.2Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.24.1...1.24.2
v1.24.1Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.24.0...1.24.1
v1.24.0Compare Source
Summary
This release brings us up to speed with the latest MCP spec
2025-11-25. Take a look at the latest spec as well as the release blog post.What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.23.0...1.24.0
v1.23.1Compare Source
Fixed:
This is a patch for servers still on 1.23.x that were breaking clients not handling the the
2025-11-25priming event behavior with empty SSEdatafields. See #1233 for more details.Full Changelog: modelcontextprotocol/typescript-sdk@1.23.0...1.23.1
v1.23.0Compare Source
What's Changed
.catchall()on inputSchema/outputSchema to support JSON Schema 2020-12 by @felixweinberger in #1135New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.22.0...1.23.0
v1.22.0Compare Source
What's Changed
registerTool: accept ZodType for input and output schema by @ksinder in #816New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.21.1...1.22.0
v1.21.2Compare Source
What's changed
This is a patch release for a regression highlighted by #1103
This patch contains only the cherry picked fix in #1108
Full Changelog: modelcontextprotocol/typescript-sdk@1.21.1...1.21.2
v1.21.1Compare Source
What's Changed
WWW-Authenticatescopeparam for SEP-835 by @chipgpt in #983New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.21.0...1.21.1
v1.21.0Compare Source
What's Changed
token_endpoint_auth_methodresponse from DCR registration by @chipgpt in #1022New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.20.2...1.21.0
v1.20.2Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.20.1...1.20.2
v1.20.1Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.20.0...1.20.1
v1.20.0Compare Source
What's Changed
New Contributors 🙏
Full Changelog: modelcontextprotocol/typescript-sdk@1.19.0...1.20.0
v1.19.1Compare Source
v1.18.2Compare Source
What's Changed
demoInMemoryOAuthProviderby @TylerLeonhardt in #931New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.18.1...1.18.2
v1.18.1Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.18.0...1.18.1
v1.18.0Compare Source
What's Changed
New Contributors
Full Changelog: modelcontextprotocol/typescript-sdk@1.17.5...1.18.0
v1.17.5Compare Source
What's Changed
Full Changelog: modelcontextprotocol/typescript-sdk@1.17.4...1.17.5
v1.17.4Compare Source
What's Changed
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.