MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
### 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 th
- Products
- @modelcontextprotocol/client, @modelcontextprotocol/sdk
- Affected versions
- Not specified
- Fixed versions
- 1.31.0, 2.2.0
- CVEs
- CVE-2026-104850
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 27 Oct 2026, 11:46 UTC · Revision 1
Source evidence
MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
core-osv · Original sourcePublished 6 Oct 2026, 15:35 UTC
### 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 th
osv:GHSA-6qxp-vccf-f47h
@modelcontextprotocol/sdk
Fixed versions: 1.31.0
@modelcontextprotocol/client
Fixed versions: 2.2.0
Complete source record
{
"id": "706a43c1a4bcbd3ac7cd30b44913f0db059929b682746be62fe8a94e255a0353",
"url": "https://osv.dev/vulnerability/GHSA-6qxp-vccf-f47h",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server",
"summary": "### 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 th",
"evidence": "osv:GHSA-6qxp-vccf-f47h",
"products": [
{
"name": {
"value": "@modelcontextprotocol/sdk",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.31.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "@modelcontextprotocol/client",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.2.0",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "GHSA-6qxp-vccf-f47h",
"aliases": [
"CVE-2026-104850",
"GHSA-6qxp-vccf-f47h"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.12.0"
},
{
"fixed": "1.31.0"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/sdk",
"purl": "pkg:npm/%40modelcontextprotocol/sdk",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6qxp-vccf-f47h/GHSA-6qxp-vccf-f47h.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.2.0"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/client",
"purl": "pkg:npm/%40modelcontextprotocol/client",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6qxp-vccf-f47h/GHSA-6qxp-vccf-f47h.json"
}
}
],
"modified": "2026-10-06T15:46:47.143033168Z",
"provider": "osv",
"references": [
"https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6qxp-vccf-f47h",
"https://github.com/modelcontextprotocol/typescript-sdk/pull/2887",
"https://github.com/modelcontextprotocol/typescript-sdk/commit/edd12e282620ebf770d67316f19cf91d4112a1bd",
"https://github.com/modelcontextprotocol/typescript-sdk",
"https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.2.0"
],
"provider_metadata": {
"cwe_ids": [
"CWE-345",
"CWE-522"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2026-10-06T15:35:44Z"
}
},
"related_cves": [
{
"value": "CVE-2026-104850",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 89262,
"published_at": "2026-10-06T15:35:44+00:00"
}