-
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
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/npm-modelcontextprotocol-sdk-vulnerability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+189
−62
Conversation
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
Contributor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Issue/PR - Triage
New issue. Needs quick review to confirm validity and assign labels.
size:XS
This PR changes 0-9 lines, ignoring generated files.
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:
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.