Vulnerability high
CVSS
high
7.5/10

CVE-2026-104850: MCP TypeScript SDK Let a Malicious MCP Server Name Its Own Authorization Server and Receive Stored Refresh Tokens and Client Secrets (CVSS 7.5)

CVE-2026-104850 is a high-severity credential theft issue (CVSS 7.5) in @modelcontextprotocol/sdk, a MCP server. Affected: >=1.12.0 <1.31.0. Fixed in 1.31.0.

Is @modelcontextprotocol/sdk running on your developers' machines? Anomity finds every device with this MCP server installed, shows the version, and can block it by policy. Detect this across your developers' devices with Anomity →

Key facts

ID
CVE-2026-104850
Aliases
GHSA-6qxp-vccf-f47h
Severity
high
CVSS score
7.5
Attack type
Credential theft
Component
@modelcontextprotocol/sdk · MCP server
Package
@modelcontextprotocol/sdk npm
Known exploited
No known exploitation
Published
Last verified

What is CVE-2026-104850?

The Model Context Protocol maintainers published GHSA-6qxp-vccf-f47h for the official TypeScript SDK on 30 September 2026; it was assigned CVE-2026-104850 (CVSS 3.1 7.5) and added to the GitHub Advisory Database and NVD on 6 October. The SDK's OAuth client let the MCP server it connected to decide which authorization server received the client's credentials, because stored and pre-provisioned credentials were not bound to the authorization server they belong to. A malicious or compromised MCP server could name its own authorization server and, with no user interaction, receive the refresh_token and client_secret stored from an earlier sign-in, or the client_secret or signed assertion of a bundled non-interactive provider. Affected: @modelcontextprotocol/sdk 1.12.0 through 1.30.1 (fixed in 1.31.0, released 28 September) and @modelcontextprotocol/client 2.0.0 through 2.1.x in specific cases (fixed in 2.2.0). Only HTTP clients using an authProvider, withOAuth() or direct auth()/fetchToken() are affected; MCP servers built with the SDK and stdio clients are not. It is the TypeScript counterpart of Python GHSA-qx49-fqc8-xw99 (see the MCP reference SDK advisories entry, also written up by Cycode), and unlike that one it is visible to npm dependency scanners. The fix does not cover a new interactive sign-in to a server-named authorization server, or direct calls to refreshAuthorization() and exchangeAuthorization(). No exploitation has been reported.

Affected versions

AffectedFixed in
>=1.12.0 <1.31.01.31.0

Am I affected by CVE-2026-104850?

You are affected if you run @modelcontextprotocol/sdk >=1.12.0 <1.31.0. Versions 1.31.0 and later include the fix.

How do I fix CVE-2026-104850?

Upgrade @modelcontextprotocol/sdk to 1.31.0+, or @modelcontextprotocol/client and core to 2.2.0+. Upgrading alone is not enough in three cases: bundled providers (ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, CrossAppAccessProvider) must be given an explicit expectedIssuer; credentials saved before the upgrade carry no issuer and must be tagged or cleared so users sign in again; and custom OAuthClientProvider implementations must persist the issuer passed to saveTokens() and saveClientInformation(). If an affected client may have connected to an untrusted MCP server, rotate its client secret or signing key and revoke its tokens. Until patched, connect OAuth-enabled clients only to MCP servers you trust.

How do I find every machine running @modelcontextprotocol/sdk?

Anomity inventories the AI agents, MCP servers, IDE extensions and skills on each developer device, so you can see which machines run @modelcontextprotocol/sdk and which version, then enforce a policy on it.

References