AI hack · Security advisory · 28 Sep 2026Fixed in 1.30.0 and 2.2.0, per The Hacker NewsTwo providers need issuer=, per advisoryNo attacks reported, per The Hacker News
Official MCP Python SDK flaw could make a client hand its OAuth secrets to a malicious MCP server
A malicious MCP server could make apps built on the official MCP Python SDK send their OAuth client secret, authorization code and PKCE verifier to 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, the SDK's advisory says. The Hacker News says versions 1.30.0 and 2.2.0, released on 7 September 2026, fix it. For the two providers that run unattended, upgrading changes nothing until they 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, the advisory says.
By Chris Hoskins, Founder, Boogey ·
Tap underlined words to see who reported them.
7.5 and 6.5
SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated
3
2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated
3 weeks
SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated
None
SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated
How a malicious server could take the secrets
Step 1
The client asks where to sign in
To log in, the client asks the MCP server, a tool server for AI agents, where its login service, the authorization server, is. The SDK 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated the answer, The Hacker News says.
Step 2
The server names another endpoint
A malicious or compromised server could direct the credentials to 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, the advisory says.
Step 3
The secrets go with it
That endpoint would receive 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated and PKCE verifier meant for the real server, or a signed client assertion with PrivateKeyJWTOAuthProvider.
Step 4
A real token follows
Cycode, named by The Hacker News as the firm that reported the flaw, showed in a test that the stolen values get a valid access token. It says the token carries SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated.
The PKCE verifier is a one-time value meant to stop a stolen code being reused, so handing it over SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, The Hacker News explains.
Who had to be there
Apps were affected if they used the SDK as an SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated with an OAuth provider and could reach servers they didn't fully control, The Hacker News says.
A person, seeing nothing odd
With the interactive OAuthClientProvider, a person still approves the sign-in. Cycode says the page they approve is the SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, so nothing looks wrong.
No one at all
The machine-to-machine providers, ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider, need 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated at all.
Not affected
MCP servers built with the SDK, local (stdio) clients and clients that attach their own tokens SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, according to The Hacker News.
The client secret is SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, so a stolen one keeps working until it is changed, The Hacker News notes.
From fix to advisory
7 Sep 2026
Versions 1.30.0 and 2.2.0 ship the issuer checks, listed under SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated rather than as a security fix, The Hacker News says.
28 Sep
The advisory follows, the same day Cycode publishes its writeup. It SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, Cycode's researcher among them, The Hacker News says.
29 Sep
SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated has been assigned yet, The Hacker News reports.
In the fixed versions, The Hacker News says, the client decides which login service it expects before it fetches anything, and SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated.
Why upgrading wasn't the whole fix
On 1.30.0, the warning about a missing issuer is a standard deprecation warning, which SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, The Hacker News says. So a team on 1.30.0 with an unattended provider could upgrade, see no warning, and still send its secrets wherever an MCP server pointed. The deprecated RFC7523OAuthClientProvider has SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, so The Hacker News says its users should move to one of the other two. The Hacker News also advises SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated once after upgrading, because older ones are not tied to a login service. For a client that may already have connected to an untrusted server, it advises SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated and revoking tokens at the login service.
The Boogey fix
Could an MCP server collect your product's sign-in secrets?
You’re exposed if
- Your product is an MCP client that connects to remote MCP servers over HTTP and signs in to them with OAuth.
- It uses the MCP Python SDK's OAuth providers and is not yet on 1.30.0 or 2.2.0, the fixed releases.
- It signs in unattended, with client credentials or a private key, and doesn't pass issuer=.
- Users, or your agent, can add MCP servers you don't fully control.
Fix it
01A version floor in your build
Set a version floor your build fails below, at SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated and 2.2.0 on the 2.x line, the fixed releases The Hacker News names. Make it fail on any use of the deprecated RFC7523OAuthClientProvider too, which has no issuer= option.
02No issuer, no start
Pass issuer=, naming the login service the credentials belong to, to every ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider, and make your app refuse to start without it. The SDK's own warning on 1.30.0 is 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated.
03Clear old registrations once
Have your product clear stored OAuth client registrations on its first start after the upgrade. Older ones are SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, The Hacker News says.
04Only servers on your list
Let an admin set which MCP servers your product may connect to, and refuse the rest. On older versions, the advisory gives 2 sourcesModel Context Protocol (GitHub)OAuth client could send credentials to an authorization server chosen by the MCP server28 Sep 2026 · first-handThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated. If your agent can add servers itself, its instructions leave that to a person.
05Rotation in one step
Build rotation into your product, so one action replaces the client secret and revokes its tokens at the login service. A stolen secret SourceThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth CredentialsUndated, The Hacker News notes.
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 we test it
- 1Under a signed scope, in your staging or a test account we create, your product gets a fake OAuth client for our test login service, with a canary client secret or test signing key that we supply. You install nothing. We scan nothing of yours, use no live keys and stay off staff machines.Being built
- 2A test user adds our benign test MCP server and asks their agent to use it, as any user might. Our server names our canary authorization server instead of the test login service.Being built
- 3We watch the canary for the planted secret, a sign-in code or a PKCE verifier, and the test user notes whether your product stopped or carried on. We cover each OAuth provider your product uses, interactive or unattended.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 sign-in code or a PKCE verifier
- It receives a signed client assertion made with the test key we supplied, if your product signs in with a private key
- Your product follows our server to a login service it didn't expect, instead of refusing the connection
Does your product use the MCP Python SDK to sign in to MCP servers? This test is still being built.
What it reveals
An MCP server can tell your client where to send its secrets, so treat its answer as a stranger's. Patched is a version number. Protected is a client that refuses a login service it didn't expect.