Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104850 Overview
CVE-2026-104850 affects the Model Context Protocol (MCP) TypeScript SDK, the official SDK for building MCP servers and clients. Starting in version 1.12.0 and prior to versions 1.31.0 and 2.2.0, the SDK's OAuth client support let a connected MCP server choose which authorization server received the client's OAuth credentials. Stored and pre-provisioned credentials were not bound to the authorization server they belong to. A malicious or compromised MCP server could point its protected resource metadata at an attacker-controlled authorization server. Without user interaction, the client would then forward sensitive OAuth material to that server. The weakness is tracked under CWE-345: Insufficient Verification of Data Authenticity.
Critical Impact
An untrusted MCP server can harvest refresh_token, client_secret, or signed client assertions tied to a legitimate authorization server, leading to full account takeover of the OAuth client identity.
Affected Products
- @modelcontextprotocol/sdk versions 1.12.0 through 1.30.x
- @modelcontextprotocol/client versions 2.0.0 and 2.1.0
- MCP clients using OAuthClientProvider, ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, or CrossAppAccessProvider
Discovery Timeline
- 2026-10-06 - CVE-2026-104850 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-104850
Vulnerability Analysis
The MCP TypeScript SDK's OAuth client flow trusted the authorization server identifier returned by the MCP server's protected resource metadata. The client did not verify that this issuer matched the authorization server the stored credentials were originally issued for. A malicious MCP server could therefore name itself (or any attacker-controlled issuer) as the authorization server for a resource. The SDK's auth driver would then automatically send credentials intended for a legitimate issuer to the attacker.
For 1.x clients, this exposed the refresh_token and client_secret captured during an earlier interactive sign-in. For both 1.x and 2.x clients, non-interactive providers such as ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, and CrossAppAccessProvider leaked their configured client_secret or signed client assertion. Attackers can replay these credentials against the legitimate authorization server to impersonate the client.
Root Cause
The SDK omitted an expectedIssuer check when resolving an authorization server from protected resource metadata. Credentials were keyed to the client identity rather than bound to a specific issuer, violating the authentication-server identity verification required by the MCP SEP-2352 guidance.
Attack Vector
The attack requires that an OAuth-enabled MCP client connects to an MCP server the operator does not fully trust while holding credentials for a legitimate authorization server. No user interaction is required. The malicious server returns crafted protected resource metadata pointing to an attacker-controlled issuer, and the SDK forwards the token request automatically.
// Patch: examples/guides/clients/machine-auth.examples.ts
const authProvider = new ClientCredentialsProvider({
clientId: 'reporting-job',
- clientSecret: 'reporting-job-secret'
+ clientSecret: 'reporting-job-secret',
+ expectedIssuer: 'https://auth.example.com'
});
const client = new Client({ name: 'reporting-job', version: '1.0.0' });
Source: GitHub commit edd12e2
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-104850
Indicators of Compromise
- Outbound HTTPS requests from MCP client hosts to OAuth token endpoints on unexpected or newly registered domains.
- MCP client logs showing authorization server discovery resolving to an issuer that does not match the configured provider.
- Unexpected refresh_token or client_credentials grant requests appearing in authorization server audit logs for client IDs that normally only authenticate to a known issuer.
Detection Strategies
- Inventory applications using @modelcontextprotocol/sdk 1.12.0–1.30.x or @modelcontextprotocol/client 2.0.0–2.1.0 via software composition analysis.
- Enable network egress logging on MCP client workloads and alert on OAuth token exchanges with issuers not on an allow list.
- Review authorization server logs for client_assertion or client_secret presentations originating from unexpected IPs or user agents.
Monitoring Recommendations
- Correlate MCP server connection events with subsequent OAuth token endpoint calls to detect issuer mismatches.
- Alert on any new MCP server registration followed by outbound credential exchanges within a short time window.
- Rotate OAuth client secrets and private keys periodically and monitor for use of retired credentials.
How to Mitigate CVE-2026-104850
Immediate Actions Required
- Upgrade @modelcontextprotocol/sdk to version 1.31.0 or @modelcontextprotocol/client to version 2.2.0.
- Add an expectedIssuer value to every OAuthClientProvider, ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, and CrossAppAccessProvider instance.
- Rotate any client_secret, refresh_token, or signing key that may have been exposed to an untrusted MCP server.
- Audit the list of MCP servers your clients connect to and remove any that are not fully trusted.
Patch Information
The fix is delivered in @modelcontextprotocol/sdk 1.31.0 and @modelcontextprotocol/client 2.2.0. The patch deprecates omitting expectedIssuer and enforces the SEP-2352 issuer check. See the GitHub Security Advisory GHSA-6qxp-vccf-f47h, Pull Request #2887, and Release v2.2.0 notes.
Workarounds
- On @modelcontextprotocol/client 2.0.0 and 2.1.0, pass expectedIssuer to every auth provider; these versions already accept the parameter.
- On 1.x versions that cannot be upgraded, restrict OAuth-enabled clients to connect only to MCP servers you fully trust.
- Isolate MCP client processes that hold high-value OAuth credentials from any workflow that interacts with third-party MCP servers.
# Upgrade to patched versions
npm install @modelcontextprotocol/sdk@^1.31.0
npm install @modelcontextprotocol/client@^2.2.0
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

