CVE-2026-104850: MCP TypeScript SDK OAuth Client Could Send Credentials Vulnerability
HIGHCVE-2026-104850 is a HIGH (CVSS 7.5) oauth client could send credentials vulnerability (CWE-522: Insufficiently Protected Credentials) affecting MCP TypeScript SDK libraries in the npm ecosystem. The issue involves oauth client could send credentials to an authorization server chosen by the mcp server. Remediation is available by upgrading affected packages to version 1.31.0, 2.2.0.
CVE-2026-104850 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-104850
To remediate this vulnerability, upgrade all affected MCP TypeScript SDK dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @modelcontextprotocol/sdk@1.31.0
npm install @modelcontextprotocol/client@2.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @modelcontextprotocol/sdk
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-104850, inspect your project dependencies using npm:
npm ls @modelcontextprotocol/sdk
Analyze the terminal output to locate any version of MCP TypeScript SDK in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.31.0), your application is affected.
Note: The npm ls @modelcontextprotocol/sdk command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In MCP TypeScript SDK, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-104850 Affected MCP TypeScript SDK Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@modelcontextprotocol/sdk
|
npm |
≥ 1.12.0
< 1.31.0
|
1.31.0
|
|
@modelcontextprotocol/client
|
npm |
≥ 2.0.0
< 2.2.0
|
2.2.0
|
References
Frequently Asked Questions
What is CVE-2026-104850?
Which MCP TypeScript SDK versions are affected?
What version fixes CVE-2026-104850?
Is @modelcontextprotocol/sdk affected?
Is @modelcontextprotocol/client affected?
What is the CVSS score of CVE-2026-104850?
What CWE is associated with CVE-2026-104850?
How can I check npm dependencies for CVE-2026-104850?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6qxp-vccf-f47h",
"modified" : "2026-10-06T15:35:44Z",
"published" : "2026-10-06T15:35:44Z",
"aliases" : [ "CVE-2026-104850" ],
"summary" : "MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server",
"details" : "### Summary\nIn 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.\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's 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: 'https://auth.example.com'`. 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`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@modelcontextprotocol/sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.12.0"
}, {
"fixed" : "1.31.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@modelcontextprotocol/client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.0"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-345", "CWE-522" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-06T15:35:44Z",
"nvd_published_at" : null
}
}