A malicious MCP server could collect your secrets.
The official Model Context Protocol (MCP) Python SDK had an OAuth flaw that let an untrusted MCP server receive credentials meant for someone else. Updating fixes most of it, but not all.

- CVE-2026-115563 is rated High (CVSS 3.1 score 7.5) in the GitHub advisory GHSA-qx49-fqc8-xw99.
- An untrusted MCP server could point the client at a token endpoint it controls and receive client secrets, authorisation codes or signed assertions.
- Affected: mcp 1.9.1 to 1.29.1 and 2.0.0 to 2.1.1. Fixed in 1.30.0 and 2.2.0.
- Two unattended providers also need the issuer set and stored registrations cleared after updating.

What happened
MCP is the protocol AI agents use to connect to tools and data. The official Python SDK includes OAuth clients so agents can sign in to MCP servers. The advisory explains that the client did not check the issuer in the authorisation server’s metadata, and stored credentials were not tied to the server they belonged to. As a result, an untrusted MCP server could send the client to a token endpoint of its choosing, and the client would hand over a client secret, an authorisation code, a PKCE code verifier or a signed client assertion.
Who is affected
- Developers using the
mcpPython package versions 1.9.1 to 1.29.1, or 2.0.0 to 2.1.1 (in 2.x only on fallback discovery) - AI agents that connect to MCP servers you do not fully control
- Services using the ClientCredentialsOAuthProvider or PrivateKeyJWTOAuthProvider, which need extra steps after updating
Why it matters
AI agents increasingly connect to many MCP servers, some written by third parties. One hostile or compromised server should never be able to collect credentials meant for another. This flaw shows that connecting an agent to a new tool server is a trust decision, even when the client code is official.
What to do now
- Update to mcp 1.30.0 or 2.2.0.
- For the two unattended providers, set
issuer=and clear stored client registrations, as the advisory describes. - If an agent may have talked to an untrusted MCP server, rotate the client secrets and revoke the tokens involved.
- Keep a list of which MCP servers your agents connect to, and who runs each one.
How HanulSec helps
- We map every MCP server your agents talk to, and who controls it.
- We stand up hostile MCP servers in testing to see exactly what your agents hand over.
- We check that secrets are bound to the right server, scoped tightly and rotated after any exposure.
Tell us what you run and we will send a fixed-price proposal within one business day. Request a quote.