GHSA-6QXP-VCCF-F47H
Vulnerability from github – Published: 2026-10-06 15:35 – Updated: 2026-10-06 15:35Summary
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_tokenandclient_secretstored from an earlier sign-in - the
client_secretor 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
authProvideron a transport - the
withOAuth()middleware - direct calls to
auth()orfetchToken()
- an
- it may connect to an MCP server you do not fully trust while holding credentials for a legitimate authorization server
Affected versions:
@modelcontextprotocol/sdk1.12.0 through 1.30.1@modelcontextprotocol/client2.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
OAuthTokensSchemaorOAuthClientInformationSchema
- bundled providers without
Not affected:
- MCP servers built with the SDK
- stdio clients
Fix
Upgrade to:
- 1.x:
@modelcontextprotocol/sdk1.31.0 or later - 2.x:
@modelcontextprotocol/client2.2.0 or later, and@modelcontextprotocol/core2.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): passexpectedIssuer, for exampleexpectedIssuer: 'https://auth.example.com'. Without it they still use whichever authorization server the MCP server names. - Credentials saved without
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. - Your own
OAuthClientProvider: save exactly whatsaveTokens()andsaveClientInformation()are given, includingissuer. For pre-registered credentials, includeissuerin whatclientInformation()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()andexchangeAuthorization()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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@modelcontextprotocol/sdk"
},
"ranges": [
{
"events": [
{
"introduced": "1.12.0"
},
{
"fixed": "1.31.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@modelcontextprotocol/client"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.2.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-104850"
],
"database_specific": {
"cwe_ids": [
"CWE-345",
"CWE-522"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-06T15:35:44Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\nIn affected versions, the SDK\u0027s OAuth client let the MCP server decide which authorization server received the client\u0027s OAuth credentials. Credentials were not tied to the authorization server they belong to.\n\nA malicious or compromised MCP server could name its own authorization server. With no user interaction, the client would send it:\n\n- the `refresh_token` and `client_secret` stored from an earlier sign-in\n- the `client_secret` or signed assertion configured on a bundled provider\n\n### Am I affected?\nYes, if both of these hold:\n\n- your application uses the SDK\u0027s OAuth client over HTTP, through any of:\n - an `authProvider` on a transport\n - the `withOAuth()` middleware\n - direct calls to `auth()` or `fetchToken()`\n- it may connect to an MCP server you do not fully trust while holding credentials for a legitimate authorization server\n\nAffected versions:\n\n- `@modelcontextprotocol/sdk` 1.12.0 through 1.30.1\n- `@modelcontextprotocol/client` 2.0.0 through 2.1.0, only for:\n - bundled providers without `expectedIssuer`\n - credentials stored or supplied without `issuer`\n - direct calls to `fetchToken()`\n - providers that read storage back through `OAuthTokensSchema` or `OAuthClientInformationSchema`\n\nNot affected:\n\n- MCP servers built with the SDK\n- stdio clients\n\n### Fix\nUpgrade to:\n\n- 1.x: `@modelcontextprotocol/sdk` 1.31.0 or later\n- 2.x: `@modelcontextprotocol/client` 2.2.0 or later, and `@modelcontextprotocol/core` 2.2.0 or later if you import it directly\n\nThe 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.\n\nIn the following cases, upgrading to the patched version is not enough. You also need to make a change:\n\n- **Bundled providers** (`ClientCredentialsProvider`, `PrivateKeyJwtProvider`, `StaticPrivateKeyJwtProvider`, `CrossAppAccessProvider`): pass `expectedIssuer`, for example `expectedIssuer: \u0027https://auth.example.com\u0027`. Without it they still use whichever authorization server the MCP server names.\n- **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.\n- **Your own `OAuthClientProvider`:** save exactly what `saveTokens()` and `saveClientInformation()` are given, including `issuer`. For pre-registered credentials, include `issuer` in what `clientInformation()` returns.\n\nNot covered by this fix:\n\n- a new interactive sign-in, which still goes to the authorization server the MCP server names. Only complete sign-ins for servers you trust.\n- `refreshAuthorization()` and `exchangeAuthorization()` called directly\n- 2.x with `skipIssuerMetadataValidation: true`\n\nIf an affected client may have connected to an untrusted MCP server, rotate its client secret or signing key and revoke its tokens.\n\nIf you cannot upgrade yet, connect OAuth clients only to MCP servers you trust. 2.0.0 and 2.1.0 already accept `expectedIssuer`.",
"id": "GHSA-6qxp-vccf-f47h",
"modified": "2026-10-06T15:35:44Z",
"published": "2026-10-06T15:35:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6qxp-vccf-f47h"
},
{
"type": "WEB",
"url": "https://github.com/modelcontextprotocol/typescript-sdk/pull/2887"
},
{
"type": "WEB",
"url": "https://github.com/modelcontextprotocol/typescript-sdk/commit/edd12e282620ebf770d67316f19cf91d4112a1bd"
},
{
"type": "PACKAGE",
"url": "https://github.com/modelcontextprotocol/typescript-sdk"
},
{
"type": "WEB",
"url": "https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.2.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.