part 5Security: the attack behind each rule·lesson 5.4 of 5·2 min read
Mix-up attacks
A mix-up attack happens when the client gets confused about which authorization server an authorization code belongs to. This lesson walks through a mix-up step by step and explains why the iss check (RFC 9207) and client credentials bound to their authorization server prevent it in MCP 2026-07-28.
In this lesson
Explain how a mix-up attack works.
Explain why iss and AS-bound client credentials prevent it.
Many authorization servers, one client
An MCP client talks to many authorization servers, sometimes one per MCP server. If one AS is malicious, it can try to get the client to hand over a code issued by an honest AS.
Mix-up, step by step
1. The user connects an MCP server whose AS is the attacker
User → Client
The client notes internally: "this flow is with A".
2. The client redirects to the attacker's AS
Client → Attacker AS
Instead of authenticating, the attacker redirects the browser to the honest AS with the client_id the client has registered there.
3. The user approves at the honest AS
User → Honest AS
They see a legitimate screen they recognize. They approve.
4. A code from the honest AS comes back
Honest AS → Client
It arrives with code and state (the state can match if the attacker passed it along). The client believes it is A's response.
5. The client redeems the code... at A's token endpoint
Client → Attacker AS
Without iss, it has no way of knowing the code is from H. It hands it to the attacker, who now holds a valid code from H.
6. With RFC 9207
Client (internal step)
The response carries iss=https://honest.example. The client expected A, so it does not match, and the client does not send the code to any token endpoint.
Summary
Mix-up: a malicious AS gets you to hand it a code issued by another AS.
Defense: exact iss check and AS-bound credentials; PKCE helps but is not enough alone.
quiz · 3 questions
1. Without RFC 9207, what information is the client missing to detect a mix-up?
code and state do not identify the issuer; iss does.
2. The authorization response carries an iss that does not match the issuer the client recorded before redirecting. What does the client do?
On a mismatch the client must not send the code anywhere: that is exactly the mix-up the check exists to stop.
3. Why does PKCE alone not prevent a mix-up?
PKCE protects against a third party that only has the code; in a mix-up the client itself hands both the code and the verifier to the attacker.