# CVE-2026-115563 in the MCP Python SDK: the server decides where your OAuth credentials go

*Advisory explainer. Facts come from the public records linked in the sources. Last checked: 2026-11-26.*

**Short answer:** in affected versions of the `mcp` Python package, an MCP client that signs in with OAuth over HTTP could be told by the MCP server which authorization server to talk to. A malicious or compromised MCP server could then receive the client secret, the authorization code or the PKCE code verifier that belonged to the real authorization server. Fixed in `mcp` 1.30.0 and 2.2.0. For two of the OAuth providers, upgrading is not enough until you also pass `issuer=`.

## What do the public records say?

**Short answer:** high severity, CVSS 3.1 score 7.5, weakness types CWE-345 (insufficient verification of data authenticity) and CWE-522 (insufficiently protected credentials). The project published its advisory in the SDK repository on 2026-09-28, and the GitHub Advisory Database has carried it since 2026-11-19.

| Field | Value in the GitHub advisory |
| --- | --- |
| Advisory ID | GHSA-qx49-fqc8-xw99 |
| CVE | CVE-2026-115563 |
| Package | `mcp` on PyPI |
| Affected versions | 1.9.1 up to but not including 1.30.0, and 2.0.0a1 up to but not including 2.2.0 (the 2.0.0 alphas are inside the range) |
| Fixed versions | 1.30.0 and 2.2.0 |
| CVSS 3.1 vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |

The CVSS score on the NVD record comes from GitHub as the CVE numbering authority, and at the time of our check NVD had not yet analyzed the record.

- **The score covers the unattended providers.** The advisory says the 7.5 rating is scored for them. With the interactive `OAuthClientProvider`, a person has to start the sign-in, and scored that way the advisory gives 6.5 (vector `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`).
- **The dates differ by source.** GitHub lists the releases `v1.30.0` and `v2.2.0` with dates of 2026-09-07. The repository advisory in `modelcontextprotocol/python-sdk` was published on 2026-09-28. The NVD record shows a publication date of 2026-11-16 and the status "Received" at the time of our check, and the GitHub Advisory Database record shows 2026-11-19. So the fixed releases came about ten weeks before the database record, and the project's own notice about seven weeks before it. Watching only the database would have shown this flaw in November.

## What went wrong?

**Short answer:** the client let the MCP server influence where its OAuth credentials were sent, in two ways, according to the advisory.

- The `issuer` in the authorization server metadata was not validated on every discovery path.
- Stored or pre-provisioned client credentials were not bound to the authorization server they belong to.

The advisory describes two routes for a malicious or compromised MCP server. It can name its own authorization server in its protected resource metadata. Or it can publish none and serve metadata that presents the user's real authorization server as the `issuer`, while pointing the token endpoint somewhere it controls. In both cases the server would receive the `client_secret`, the authorization code and the PKCE `code_verifier` meant for the real server, or a signed client assertion when `PrivateKeyJWTOAuthProvider` is used. We have not run the SDK to reproduce this behavior.

## Is my product affected?

**Short answer:** the advisory says yes if both of these hold.

1. Your application uses the SDK as an MCP client over HTTP, with `OAuthClientProvider`, `ClientCredentialsOAuthProvider`, `PrivateKeyJWTOAuthProvider` or the deprecated 1.x `RFC7523OAuthClientProvider` as the transport's `auth` handler.
2. It may connect to an MCP server you do not fully trust while holding credentials for a legitimate authorization server, such as a pre-provisioned secret, a signing key or a stored client registration.

Per the advisory, these are not affected: MCP servers built with the SDK, stdio clients, and clients that attach their own tokens or headers.

The affected range inside each line, from the advisory:

- 1.9.1 through 1.29.1: no `issuer` check and no credential binding on any path.
- 2.0.0 through 2.1.1: both missing whenever the server publishes no protected resource metadata (the legacy fallback) or answers `403 insufficient_scope`.
- Both lines, on every path: `ClientCredentialsOAuthProvider` and `PrivateKeyJWTOAuthProvider` had no way to name the authorization server their credentials belong to.

## What does the fix change, and what does it leave to you?

**Short answer:** the fixed versions check the issuer and bind stored registrations to it. Two providers still need a setting from you.

In the fixed versions the client works out which issuer it expects before it fetches any authorization server metadata, refuses metadata whose `issuer` differs (with `OAuthFlowError`), and binds stored registrations to that issuer. A registration bound to a different issuer is discarded so the client registers again.

What you must do yourself, per the advisory:

- **Pass `issuer=`** to `ClientCredentialsOAuthProvider` and `PrivateKeyJWTOAuthProvider`, for example `issuer="https://auth.example.com"`. Without it they still follow whichever authorization server the MCP server advertises. Omitting it now emits a deprecation warning, and the advisory says it becomes required in 3.0. On 1.30.0 it is a `DeprecationWarning`, which Python hides by default.
- **Replace `RFC7523OAuthClientProvider`.** The deprecated 1.x provider has no `issuer` option. Move to one of the two providers above.
- **Clear stored registrations once.** A registration stored without an issuer stays unbound, including everything 1.x stored before 1.30.0. If you placed a pre-registered client in storage yourself, set `issuer` on that record instead.
- **Rotate after possible exposure.** If such a client may have connected to an untrusted MCP server, rotate its client secret and revoke its tokens at the authorization server.

The advisory names no workaround for earlier versions, other than connecting OAuth-enabled clients only to MCP servers you trust.

## What should you check in your own system?

**Short answer:** version, providers, which servers you connect to, and what a leaked secret could do.

1. **Version.** Run `pip show mcp` in every deployed image. Compare with 1.30.0 and 2.2.0.
2. **Providers.** Search for `OAuthClientProvider`, `ClientCredentialsOAuthProvider`, `PrivateKeyJWTOAuthProvider` and `RFC7523OAuthClientProvider`. For each hit, note whether `issuer=` is set.
3. **Servers.** List every MCP server the client connects to over HTTP. Mark the ones run by someone else, and the ones whose address a user or a configuration file can change. An agent that lets users add MCP servers is the clearest case, see [agent tool permissions and MCP server review](/guides/agent-tool-permissions-mcp).
4. **Credentials in reach.** For each client, list the secrets and signing keys it holds and what each can do at the real authorization server. In our reasoning, a client secret with broad scopes raises the cost of one bad connection.
5. **Network path.** This is our suggestion and not part of the advisory, which names only one workaround: connect to trusted servers. If your client runs behind an egress allowlist, check that token endpoints of unknown hosts are not reachable. This may limit the damage and does not replace the fix.
6. **Regression test.** Use throwaway credentials and a listener on localhost or an isolated test network. Never aim a production client secret or signing key at a test listener. Run a test MCP server you control that advertises a different authorization server, or serves metadata that names your test authorization server as the `issuer` while pointing the token endpoint at your listener. Cover each path the advisory lists, including a server with no protected resource metadata and a `403 insufficient_scope` answer. Connect your client and assert that the listener receives no secret, code or verifier that belong to the real authorization server. A refusal with `OAuthFlowError` is the expected result for the mismatched `issuer` route. For the other routes the fixed client may sign in to the server it was pointed at, so the assertion is about what reaches your listener. `ClientCredentialsOAuthProvider` and `PrivateKeyJWTOAuthProvider` without `issuer=` are expected to fail this test even on fixed versions, so set `issuer=` first. Keep the test in CI, see the [AI security regression tests guide](/guides/ai-security-regression-tests).

In our view this is the same trust boundary as [indirect prompt injection](/guides/indirect-prompt-injection), in a different place. The text in a tool result is untrusted, and so is the metadata a tool server serves about where to send your credentials.

## Sources

A record does not mean anyone was attacked.

- GitHub Advisory Database, [GHSA-qx49-fqc8-xw99](https://github.com/advisories/GHSA-qx49-fqc8-xw99). Published 2026-11-19.
- Project advisory, [GHSA-qx49-fqc8-xw99 in the python-sdk repository](https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-qx49-fqc8-xw99). Published 2026-09-28.
- National Vulnerability Database, [CVE-2026-115563](https://nvd.nist.gov/vuln/detail/CVE-2026-115563).
- Releases: [v1.30.0](https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0) and [v2.2.0](https://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0).

We re-check this page against the records when they are updated. If you see a difference, write to contact@arviser.com.

<!--digest-card:advisory-->

**Next:** [Agent tool permissions and MCP](/guides/agent-tool-permissions-mcp) · [CVE-2026-30623 in LiteLLM](/guides/litellm-mcp-stdio-cve-2026-30623) · [Indirect prompt injection](/guides/indirect-prompt-injection) · [AI Security Review](/ai-security) · [Request scope](/#scope)
