AI hack · Security advisory · 6 Oct 2026CVE-2026-104850Patched, OSV saysUpgrading alone not enough, OSV says

MCP TypeScript SDK flaw let a connected MCP server choose where a client's OAuth credentials went

The MCP TypeScript SDK let a connected MCP server 2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated, the sign-in service, received a client's OAuth credentials (CVE-2026-104850). A malicious or compromised server could name its own and receive them, with no user interaction. The patched client SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026 to the authorization server that issued it, and sends it to no other, OSV says.

By Chris Hoskins, Founder, Boogey ·

Tap underlined words to see who reported them.

None

2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated

Any connected server

2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated

Sign in again

SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026

2.0.0 and 2.1.0

SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026

How a server could redirect a client's sign-in

  1. Step 1

    The server names the sign-in service

    The SDK's OAuth client let an MCP server, a tool server an AI agent connects to, decide which authorization server 2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated.

  2. Step 2

    A server turns hostile

    A malicious or compromised MCP server could 2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated instead.

  3. Step 3

    Credentials sent, no click

    The client would send its credentials there, with 2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated.

Why the client followed

Credentials were 2 sourcesOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026GitLab Advisory Database@modelcontextprotocol/sdk: CVE-2026-104850Undated they belonged to. So the MCP server's word was the only check on where the credentials went. A server that was safe the day a user added it can be compromised later. Without its own record, the client can't tell.

What the patched client does

  • An issuer on every credential

    OSV says the client SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026 on each saved credential, and won't send it to a different one.

  • Sign in again, or stop

    On a mismatch, it says, the user SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026, or the call throws an error.

  • An option already in 2.x

    Versions 2.0.0 and 2.1.0 already accept an SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026, OSV notes.

OSV says SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026 for a client that may already have connected to an untrusted MCP server. It says the client secret or signing key should be rotated, and its tokens revoked.

The Boogey fix

Could an MCP server steer where your product's credentials go?

You’re exposed if

  • Your product is an MCP client. Users add remote MCP servers to it, and it signs in to them with OAuth.
  • It uses the MCP TypeScript SDK's OAuth client on a release from before the issuer fix.
  • It keeps OAuth credentials between sessions, or holds a client secret or signing key of its own.
  • Users can add servers you don't run, or a server you trust could be compromised later.

Fix it

  1. 01A version floor in your build

    Set a version floor your build fails below, at the first patched release of the MCP TypeScript SDK on your major version. An unpatched copy then never ships.

  2. 02Name the issuer you expect

    Where your code knows which authorization server a client should use, pass it as expectedIssuer. OSV notes that 2.0.0 and 2.1.0 SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026.

  3. 03Credentials bound to their issuer

    If your product stores tokens itself, store the issuer beside each one and send it to no other server. On a mismatch, have the user SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026, as OSV says the patched SDK does.

  4. 04Only servers on your list

    Let an admin set which MCP servers your product may connect to, and refuse the rest. Until a client is upgraded, OSV's workaround is the same, which is to use SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026. If your agent can add servers itself, its instructions leave that to a person.

  5. 05Rotation in one step

    Build rotation into your product, so one action replaces the client secret or signing key and revokes saved tokens. SourceOSVGHSA-6qxp-vccf-f47h: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server6 Oct 2026 if a client may have connected to an untrusted server.

On your platform

Settings you already have that help against this hack. Last checked 1 Dec 2026.

  • Allow only approved MCP servers

    In managed settings, set allowManagedMcpServersOnly to true and list allowedMcpServers by URL or command.

    How

Every setting for every platform

How we test it

  1. 1Under a signed scope, in your staging or a test account we create, a test user adds our benign test MCP server to your product. You install nothing. We scan nothing of yours, use no live keys and stay off staff machines.Being built
  2. 2The test user signs in once through our test sign-in service. It issues only fake credentials we planted. They are a canary client secret and canary tokens. Then our MCP server names a different authorization server, our canary.Being built
  3. 3The test user asks their agent to use the server again, as any user might. We watch our canary for the planted values, and the test user notes whether your product stopped or asked them to sign in again.Being built
Built
BT-07 · Poisoned or malicious MCP servers, tools and skillsBT-06 · Over-scoped tokens and agent identityBT-08 · Vulnerable MCP server, agent framework or AI library code

It fails if

  • Our canary authorization server receives the planted client secret, a canary token, or a sign-in code from our test service
  • Your product moves to the new authorization server without stopping or asking the test user to sign in again
Get started

Does your product sign in to MCP servers your users add? This test is still being built.

What it reveals

The MCP server a user adds gets a say in where your client signs in. A credential that knows which server issued it goes to no other.