# CVE-2026-104850: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server

> A malicious MCP server can trick the TypeScript SDK client into sending OAuth credentials to an attacker-controlled authorization server, exposing secrets.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Oct 2026
- **Updated:** 6 Oct 2026
- **Also known as:** CLEANSTART-2026-LO03281, CLEANSTART-2026-YP03178, CLSA-2026-1791626582, CLSA-2026-1791679180, CLSA-2026-1791835900, CLSA-2026-1791839313, CLSA-2026-1792257408, CLSA-2026-1792262854, CLSA-2026-1792263903, CLSA-2026-1793207764, ECHO-1d8f-3ead-8a1a, GHSA-6qxp-vccf-f47h, MINI-4jc8-xcq8-2mq5, MINI-7qqf-727q-qgwx, MINI-986q-h7qc-38hp, MINI-9jf9-cj6h-wjh6, MINI-cv2w-94hh-6wc7, MINI-hq4p-mr85-qc94, MINI-mh8x-5q7c-w76h, MINI-mmvv-x2qv-cjrw, MINI-rh5m-mv6j-jr7j, MINI-v9gp-c39w-8594, MINI-w25v-789g-cqg4, ROOT-APP-NPM-CVE-2026-104850

## What is CVE-2026-104850?

CVE-2026-104850 is a high-severity vulnerability in modelcontextprotocol typescript-sdk, published on 6 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

MCP TypeScript SDK is the official TypeScript SDK for Model Context Protocol 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 the MCP server a client connected to decide 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 name its own authorization server in its protected resource metadata. Without any user interaction, the client would send that server the `refresh_token` and `client_secret` stored from an earlier sign-in (1.x), or the configured `client_secret` or signed assertion of a bundled non-interactive provider (1.x and 2.x). Only those applications that use the SDK as an MCP client over HTTP with an `authProvider`: your own `OAuthClientProvider`, or the bundled `ClientCredentialsProvider`, `PrivateKeyJwtProvider`, `StaticPrivateKeyJwtProvider` or (2.x) `CrossAppAccessProvider` and that may connect to an MCP server the owners does not fully trust while holding credentials for a legitimate authorization server are affected. `@modelcontextprotocol/sdk` 1.31.0 (1.x) and `@modelcontextprotocol/client` 2.2.0 (2.x) patch the issue. A workaround for those who cannot upgrade is available. 2.0.0 and 2.1.0 already accept `expectedIssuer`. On 1.x, the only workaround is to connect OAuth-enabled clients only to MCP servers you trust.

Weakness: CWE-522 (Insufficiently Protected Credentials), CWE-345 (Insufficient Verification of Data Authenticity)

## Which versions are affected by CVE-2026-104850?

4 open source packages ship an affected version, including @modelcontextprotocol/client and @modelcontextprotocol/sdk.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@modelcontextprotocol/client` | npm | From 2.0.0 | 2.2.0 |
| `@modelcontextprotocol/client` | npm | From 2.0.0 | 2.2.0 |
| `@modelcontextprotocol/sdk` | npm | From 1.12.0 | 1.31.0 |
| `@modelcontextprotocol/sdk` | npm | From 1.12.0 | 1.31.0 |

## How do I fix CVE-2026-104850?

Upgrade @modelcontextprotocol/client to 2.2.0 or later.

## Is CVE-2026-104850 being exploited?

There is no known exploitation of CVE-2026-104850 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-104850 and fix it if it is affected.

What it is: CVE-2026-104850 is a high-severity vulnerability in modelcontextprotocol typescript-sdk, published on 6 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-104850 in the wild and no public exploit code.

Affected packages and fixed versions:
- @modelcontextprotocol/client (npm): affected from 2.0.0; fixed in 2.2.0
- @modelcontextprotocol/client (npm): affected from 2.0.0; fixed in 2.2.0
- @modelcontextprotocol/sdk (npm): affected from 1.12.0; fixed in 1.31.0
- @modelcontextprotocol/sdk (npm): affected from 1.12.0; fixed in 1.31.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-104850/ (Markdown: https://insights.sbomify.com/CVE-2026-104850/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-104850
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-104850
- OSV: https://osv.dev/vulnerability/CVE-2026-104850

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-104850/
Summaries are generated and may contain mistakes; the official description above is the record.
