Skip to content

Commit f57f715

Browse files
fix(deps): update dependency @modelcontextprotocol/sdk to v1.31.0 [security] (#154)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@modelcontextprotocol/sdk](https://modelcontextprotocol.io) ([source](https://redirect.github.com/modelcontextprotocol/typescript-sdk)) | [`1.30.0` → `1.31.0`](https://renovatebot.com/diffs/npm/@modelcontextprotocol%2fsdk/1.30.0/1.31.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@modelcontextprotocol%2fsdk/1.31.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@modelcontextprotocol%2fsdk/1.30.0/1.31.0?slim=true) | --- ### MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server [CVE-2026-104850](https://nvd.nist.gov/vuln/detail/CVE-2026-104850) / [GHSA-6qxp-vccf-f47h](https://redirect.github.com/advisories/GHSA-6qxp-vccf-f47h) <details> <summary>More information</summary> #### 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: - the `refresh_token` and `client_secret` stored from an earlier sign-in - the `client_secret` or signed assertion configured on a bundled provider ##### Am I affected? Yes, if both of these hold: - your application uses the SDK's OAuth client over HTTP, through any of: - an `authProvider` on a transport - the `withOAuth()` middleware - direct calls to `auth()` or `fetchToken()` - it may connect to an MCP server you do not fully trust while holding credentials for a legitimate authorization server Affected versions: - `@modelcontextprotocol/sdk` 1.12.0 through 1.30.1 - `@modelcontextprotocol/client` 2.0.0 through 2.1.0, only for: - bundled providers without `expectedIssuer` - credentials stored or supplied without `issuer` - direct calls to `fetchToken()` - providers that read storage back through `OAuthTokensSchema` or `OAuthClientInformationSchema` Not affected: - MCP servers built with the SDK - stdio clients ##### Fix Upgrade to: - 1.x: `@modelcontextprotocol/sdk` 1.31.0 or later - 2.x: `@modelcontextprotocol/client` 2.2.0 or later, and `@modelcontextprotocol/core` 2.2.0 or later if you import it directly The client now records the authorization server as `issuer` on 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: - **Bundled providers** (`ClientCredentialsProvider`, `PrivateKeyJwtProvider`, `StaticPrivateKeyJwtProvider`, `CrossAppAccessProvider`): pass `expectedIssuer`, for example `expectedIssuer: 'https://auth.example.com'`. Without it they still use whichever authorization server the MCP server names. - **Credentials saved without `issuer`:** tokens and client information your `OAuthClientProvider` persisted (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. Add `issuer` to them, or clear them so users sign in again. - **Your own `OAuthClientProvider`:** save exactly what `saveTokens()` and `saveClientInformation()` are given, including `issuer`. For pre-registered credentials, include `issuer` in what `clientInformation()` returns. Not covered by this fix: - a new interactive sign-in, which still goes to the authorization server the MCP server names. Only complete sign-ins for servers you trust. - `refreshAuthorization()` and `exchangeAuthorization()` called directly - 2.x with `skipIssuerMetadataValidation: true` If 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 Score: 7.5 / 10 (High) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N` #### References - [https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6qxp-vccf-f47h](https://redirect.github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6qxp-vccf-f47h) - [https://github.com/modelcontextprotocol/typescript-sdk/pull/2887](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2887) - [https://github.com/modelcontextprotocol/typescript-sdk/commit/edd12e282620ebf770d67316f19cf91d4112a1bd](https://redirect.github.com/modelcontextprotocol/typescript-sdk/commit/edd12e282620ebf770d67316f19cf91d4112a1bd) - [https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.2.0](https://redirect.github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.2.0) - [https://github.com/advisories/GHSA-6qxp-vccf-f47h](https://redirect.github.com/advisories/GHSA-6qxp-vccf-f47h) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-6qxp-vccf-f47h) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server [CVE-2026-104850](https://nvd.nist.gov/vuln/detail/CVE-2026-104850) / [GHSA-6qxp-vccf-f47h](https://redirect.github.com/advisories/GHSA-6qxp-vccf-f47h) <details> <summary>More information</summary> #### 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: - the `refresh_token` and `client_secret` stored from an earlier sign-in - the `client_secret` or signed assertion configured on a bundled provider ##### Am I affected? Yes, if both of these hold: - your application uses the SDK's OAuth client over HTTP, through any of: - an `authProvider` on a transport - the `withOAuth()` middleware - direct calls to `auth()` or `fetchToken()` - it may connect to an MCP server you do not fully trust while holding credentials for a legitimate authorization server Affected versions: - `@modelcontextprotocol/sdk` 1.12.0 through 1.30.1 - `@modelcontextprotocol/client` 2.0.0 through 2.1.0, only for: - bundled providers without `expectedIssuer` - credentials stored or supplied without `issuer` - direct calls to `fetchToken()` - providers that read storage back through `OAuthTokensSchema` or `OAuthClientInformationSchema` Not affected: - MCP servers built with the SDK - stdio clients ##### Fix Upgrade to: - 1.x: `@modelcontextprotocol/sdk` 1.31.0 or later - 2.x: `@modelcontextprotocol/client` 2.2.0 or later, and `@modelcontextprotocol/core` 2.2.0 or later if you import it directly The client now records the authorization server as `issuer` on 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: - **Bundled providers** (`ClientCredentialsProvider`, `PrivateKeyJwtProvider`, `StaticPrivateKeyJwtProvider`, `CrossAppAccessProvider`): pass `expectedIssuer`, for example `expectedIssuer: 'https://auth.example.com'`. Without it they still use whichever authorization server the MCP server names. - **Credentials saved without `issuer`:** tokens and client information your `OAuthClientProvider` persisted (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. Add `issuer` to them, or clear them so users sign in again. - **Your own `OAuthClientProvider`:** save exactly what `saveTokens()` and `saveClientInformation()` are given, including `issuer`. For pre-registered credentials, include `issuer` in what `clientInformation()` returns. Not covered by this fix: - a new interactive sign-in, which still goes to the authorization server the MCP server names. Only complete sign-ins for servers you trust. - `refreshAuthorization()` and `exchangeAuthorization()` called directly - 2.x with `skipIssuerMetadataValidation: true` If 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 Score: 7.5 / 10 (High) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N` #### References - [https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6qxp-vccf-f47h](https://redirect.github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6qxp-vccf-f47h) - [https://github.com/modelcontextprotocol/typescript-sdk/pull/2887](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2887) - [https://github.com/modelcontextprotocol/typescript-sdk/commit/edd12e282620ebf770d67316f19cf91d4112a1bd](https://redirect.github.com/modelcontextprotocol/typescript-sdk/commit/edd12e282620ebf770d67316f19cf91d4112a1bd) - [https://github.com/modelcontextprotocol/typescript-sdk](https://redirect.github.com/modelcontextprotocol/typescript-sdk) - [https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.2.0](https://redirect.github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.2.0) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-6qxp-vccf-f47h) and the [GitHub Advisory Database](https://redirect.github.com/github/advisory-database) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>modelcontextprotocol/typescript-sdk (@&#8203;modelcontextprotocol/sdk)</summary> ### [`v1.31.0`](https://redirect.github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.31.0) [Compare Source](https://redirect.github.com/modelcontextprotocol/typescript-sdk/compare/1.30.1...1.31.0) #### Upgrade notes - Stored OAuth tokens and client information now include an `issuer` field. Storage that rejects unknown fields needs to allow it. - Pass `expectedIssuer` when constructing `ClientCredentialsProvider`, `PrivateKeyJwtProvider` or `StaticPrivateKeyJwtProvider`. Constructing them without it is deprecated. #### What's Changed - \[v1.x] Bind stored OAuth credentials to the authorization server that issued them by [@&#8203;maxisbey](https://redirect.github.com/maxisbey) in [#&#8203;2888](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2888) - chore: bump version to 1.31.0 by [@&#8203;claude](https://redirect.github.com/claude)\[bot] in [#&#8203;2890](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2890) **Full Changelog**: <modelcontextprotocol/typescript-sdk@1.30.1...1.31.0> ### [`v1.30.1`](https://redirect.github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.30.1) [Compare Source](https://redirect.github.com/modelcontextprotocol/typescript-sdk/compare/1.30.0...1.30.1) #### What's Changed - \[v1.x] fix(server): read HTTP request bodies with a size limit and bound JSON-RPC batch length by [@&#8203;maxisbey](https://redirect.github.com/maxisbey) in [#&#8203;2717](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2717) - fix(auth): preserve resource URI without trailing slash ([#&#8203;1968](https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/1968)) by [@&#8203;MukundaKatta](https://redirect.github.com/MukundaKatta) in [#&#8203;1972](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1972) - chore: bump version to 1.30.1 by [@&#8203;claude](https://redirect.github.com/claude)\[bot] in [#&#8203;2848](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2848) #### New Contributors - [@&#8203;MukundaKatta](https://redirect.github.com/MukundaKatta) made their first contribution in [#&#8203;1972](https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/1972) **Full Changelog**: <modelcontextprotocol/typescript-sdk@1.30.0...1.30.1> </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC42Ny4yIiwidXBkYXRlZEluVmVyIjoiNDQuMTMyLjIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInJlbm92YXRlIl19--> Co-authored-by: khepri-bot[bot] <269588972+khepri-bot[bot]@users.noreply.github.com>
1 parent 782978f commit f57f715

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎mcp/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"node": "v25.9.0"
3535
},
3636
"dependencies": {
37-
"@modelcontextprotocol/sdk": "1.30.0",
37+
"@modelcontextprotocol/sdk": "1.31.0",
3838
"ws": "8.21.3",
3939
"zod": "4.4.3"
4040
},

‎pnpm-lock.yaml‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)