Update dependency @modelcontextprotocol/sdk to v1.32.0 [SECURITY] #52
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/katanatools!52
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/npm-modelcontextprotocol-sdk-vulnerability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.29.0→1.32.0MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
CVE-2026-104850 / GHSA-6qxp-vccf-f47h
More information
Details
Summary
In affected versions, the SDK's OAuth client let the MCP server decide which authorization server received the client's OAuth credentials. Credentials were not tied to the authorization server they belong to.
A malicious or compromised MCP server could name its own authorization server. With no user interaction, the client would send it:
refresh_tokenandclient_secretstored from an earlier sign-inclient_secretor signed assertion configured on a bundled providerAm I affected?
Yes, if both of these hold:
authProvideron a transportwithOAuth()middlewareauth()orfetchToken()Affected versions:
@modelcontextprotocol/sdk1.12.0 through 1.30.1@modelcontextprotocol/client2.0.0 through 2.1.0, only for:expectedIssuerissuerfetchToken()OAuthTokensSchemaorOAuthClientInformationSchemaNot affected:
Fix
Upgrade to:
@modelcontextprotocol/sdk1.31.0 or later@modelcontextprotocol/client2.2.0 or later, and@modelcontextprotocol/core2.2.0 or later if you import it directlyThe client now records the authorization server as
issueron saved credentials and does not send them to a different one. The user signs in again, or the call throws.In the following cases, upgrading to the patched version is not enough. You also need to make a change:
ClientCredentialsProvider,PrivateKeyJwtProvider,StaticPrivateKeyJwtProvider,CrossAppAccessProvider): passexpectedIssuer, for exampleexpectedIssuer: 'https://auth.example.com'. Without it they still use whichever authorization server the MCP server names.issuer: tokens and client information yourOAuthClientProviderpersisted (file, keychain, database) before upgrading, including everything 1.x saved before 1.31.0. They still go to whichever authorization server is named at first use. Addissuerto them, or clear them so users sign in again.OAuthClientProvider: save exactly whatsaveTokens()andsaveClientInformation()are given, includingissuer. For pre-registered credentials, includeissuerin whatclientInformation()returns.Not covered by this fix:
refreshAuthorization()andexchangeAuthorization()called directlyskipIssuerMetadataValidation: trueIf an affected client may have connected to an untrusted MCP server, rotate its client secret or signing key and revoke its tokens.
If you cannot upgrade yet, connect OAuth clients only to MCP servers you trust. 2.0.0 and 2.1.0 already accept
expectedIssuer.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
MCP TypeScript SDK: Experimental tasks were not tied to the session that created them
CVE-2026-111767 / GHSA-22jm-h49p-29qw
More information
Details
Summary
In affected versions, the experimental tasks feature (
taskStore) did not check which session created a task. Clients sharing oneInMemoryTaskStorecould list, read and cancel each other's tasks.Experimental tasks are deprecated. The 2026-07-28 specification replaced them with a redesigned extension. The best course of action is to stop using them.
Am I affected?
Only if your HTTP server passes
taskStoretoMcpServerorServer. Ifgrep -ri taskstore --exclude-dir=node_modules .finds nothing, you are not affected.Affected versions:
@modelcontextprotocol/sdk1.24.0 through 1.31.0. The 2.x packages are not affected.Fix
Upgrade to
@modelcontextprotocol/sdk1.32.0 or later. Each task is now tied to the session that created it, so a client that starts a new session can no longer reach its earlier tasks.If you cannot upgrade yet, remove
taskStore, or create oneInMemoryTaskStoreper session.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodies
CVE-2026-111769 / GHSA-6prh-2h8m-c8cw
More information
Details
Summary
In affected versions, the SDK's HTTP client transports and OAuth requests followed redirects to any origin.
If an MCP server or authorization server redirected a request to another origin, that origin received custom request headers (such as an
X-API-Keyset inrequestInit.headers) and themcp-session-idheader. On a307or308it also received the request body, including OAuth token requests with theirrefresh_tokenandclient_secret.On current runtimes
fetchalready drops theAuthorizationheader across origins.Am I affected?
Yes, if your application uses
StreamableHTTPClientTransport,SSEClientTransport, or the SDK's OAuth client functions such asauth(). stdio clients are not affected.Affected versions:
@modelcontextprotocol/sdkall versions through 1.31.0@modelcontextprotocol/client2.0.0 through 2.2.0Fix
Upgrade to:
@modelcontextprotocol/sdk1.32.0 or later@modelcontextprotocol/client2.3.0 or laterRedirects are now followed only within the same origin, and not at all in browsers. If your MCP server or authorization server redirects to another origin on purpose, configure the final URL instead. Setting
redirectPolicy: 'follow'on a transport restores the old behaviour and the exposure.If a redirect may have reached a host you do not control, rotate the API keys and
client_secretyour application held and revoke its tokens.If you cannot upgrade yet, pass a
fetchthat refuses redirects, for example(url, init) => fetch(url, { ...init, redirect: 'error' }).Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service
CVE-2026-111771 / GHSA-rvq5-wwqv-78pq
More information
Details
Summary
In affected versions, the SDK's server-side bearer authentication had no way to check that a token was issued for your server (its audience). Where one authorization server issues tokens for several services, a valid token for another service was also accepted by your MCP server.
Am I affected?
Yes, if your HTTP server uses
requireBearerAuth()orverifyBearerToken(), its authorization server also issues tokens for other services, and yourverifyAccessToken()does not check the token's audience (aud) itself.Affected versions:
@modelcontextprotocol/sdk1.6.0 through 1.31.0@modelcontextprotocol/server2.0.0 through 2.2.0@modelcontextprotocol/express2.0.0 through 2.0.1@modelcontextprotocol/server-legacy2.0.0 through 2.3.0Fix
Upgrade to:
@modelcontextprotocol/sdk1.32.0 or later@modelcontextprotocol/server2.3.0 or later, together with@modelcontextprotocol/express2.0.2 or later if you use it@modelcontextprotocol/server-legacy2.3.1 or laterUpgrading alone changes nothing. The patched versions add an
expectedResourcesetting that is off by default. To turn the check on, make both of these changes together:requireBearerAuth({ verifier, expectedResource: new URL('https://mcp.example.com/mcp') }).verifyAccessToken()asAuthInfo.resource, also aURL.A token for another service then gets
401. With only the first change, every request gets401.If you cannot upgrade yet, reject any token whose
auddoes not include your server insideverifyAccessToken(). That closes the issue on every version.Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation
CVE-2026-111768 / GHSA-46jr-4wx8-v453
More information
Details
Summary
In affected versions, servers put no limit on how many array elements and object keys they validated in one request. One HTTP request within the default 4 MiB size limit could exhaust the server's memory, and the process aborted with
JavaScript heap out of memory.No credentials are needed, unless you authenticate requests before they reach the SDK.
Am I affected?
Yes, if clients you do not fully trust can reach your server over HTTP. The risk is highest for
McpServertools whose input contains an array or a record. stdio-only servers are not affected.Affected versions:
@modelcontextprotocol/sdk1.3.0 through 1.31.0@modelcontextprotocol/server2.0.0 through 2.2.0Fix
Upgrade to:
@modelcontextprotocol/sdk1.32.0 or later@modelcontextprotocol/server2.3.0 or laterUpgrading alone changes nothing. The patched versions add an
McpServeroption,maxToolInputElements, that is off by default. Make both of these changes:maxToolInputElementsjust above the largest input your tools need, for examplenew McpServer(info, { maxToolInputElements: 10_000 }). It counts array elements and object keys in a call's arguments. A call over the limit gets anisError: trueresult.maxRequestBodySizeon the transport orcreateMcpHandler(). If you parse the body yourself, for example withexpress.json()or Fastify, set that parser's limit.If you cannot upgrade yet, make the second change.
maxRequestBodySizeneeds@modelcontextprotocol/sdk1.30.1 or@modelcontextprotocol/server2.1.0. Below that, use a reverse proxy.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length
GHSA-f897-62hf-6gxq
More information
Details
Summary
In affected versions, MCP servers reachable over HTTP put no limit on the size of a POST body or on the number of messages in a JSON-RPC batch. Large requests could exhaust the server's memory, and one long batch could block it from serving anyone else. No credentials were needed, unless your application authenticates requests before they reach the SDK.
Am I affected?
Yes, if clients you do not fully trust can reach your server over Streamable HTTP. A body parser such as
express.json()does not protect you, because it does not limit batch length. Servers that only use stdio are not affected.Affected versions:
@modelcontextprotocol/sdk1.10.0 through 1.30.0@modelcontextprotocol/server2.0.0@modelcontextprotocol/node2.0.0@modelcontextprotocol/hono2.0.0Fix
Upgrade to:
@modelcontextprotocol/sdk1.30.1 or later@modelcontextprotocol/server2.1.0,@modelcontextprotocol/node2.1.0 and@modelcontextprotocol/hono2.0.1 or later. Upgrade every one you have installed.Bodies over 4 MiB now get
413, and batches over 100 messages get400. If your clients send larger bodies, raise the newmaxRequestBodySizeoption.If you cannot upgrade yet, cap request body size in a reverse proxy.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
modelcontextprotocol/typescript-sdk (@modelcontextprotocol/sdk)
v1.32.0Compare Source
Upgrade notes
redirectPolicy: 'follow'onStreamableHTTPClientTransportorSSEClientTransport. In browsers, a redirected request fails unless that option is set.maxToolInputElementsonMcpServerlimits the number of array elements and object members in a tool call's arguments.expectedResourceonrequireBearerAuthaccepts only tokens issued for this server (the token's audience).What's Changed
New Contributors
Full Changelog: https://github.com/modelcontextprotocol/typescript-sdk/compare/1.31.0...1.32.0
v1.31.0Compare Source
Upgrade notes
issuerfield. Storage that rejects unknown fields needs to allow it.expectedIssuerwhen constructingClientCredentialsProvider,PrivateKeyJwtProviderorStaticPrivateKeyJwtProvider. Constructing them without it is deprecated.What's Changed
Full Changelog: https://github.com/modelcontextprotocol/typescript-sdk/compare/1.30.1...1.31.0
v1.30.1Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/modelcontextprotocol/typescript-sdk/compare/1.30.0...1.30.1
v1.30.0Compare Source
What's Changed
New Contributors
Full Changelog: https://github.com/modelcontextprotocol/typescript-sdk/compare/v1.29.0...1.30.0
Configuration
📅 Schedule: (UTC)
🚦 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.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
Security
View full report
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.