Skip to content
IAM Insights

Explainers · Glossary

Mix-up attack

mix-up attack · mix-up attacks

By Boston Identity · Explained · 7 min read

The short answer

A mix-up attack tricks an OAuth (Open Authorization) client that uses several authorization servers into sending a code or token from an honest server to one the attacker controls. The defence is to check which server each response came from.

What it is
An attack
Defined by
IETF, RFC 9700 (Best Current Practice), section 4.4
Who it's for
Teams whose apps or agents sign users in through more than one authorization server
In our briefings
5By month of the source: 2026-01: 0, 2026-02: 0, 2026-03: 0, 2026-04: 0, 2026-05: 0, 2026-06: 0, 2026-07: 1, 2026-08: 0, 2026-09: 0, 2026-10: 0, 2026-11: 1, 2026-12: 00by month, last 12
01

What is Mix-up attack?

Suppose your team's app lets users connect accounts held at several providers, and someone adds one more provider through self-service registration. A user clicks the new provider's button, lands on the sign-in page of a provider they already trust, and approves. Your app then hands the approval code to the new provider, which belongs to an attacker. The user saw nothing odd, and nobody broke into the honest provider.

That is a mix-up attack. RFC 9700 describes it. The document is a Request for Comments (RFC) from the Internet Engineering Task Force (IETF), and it sets out the best current security practice for OAuth (Open Authorization). It says the attack can occur when a client, the application asking for access, interacts with two or more authorization servers and at least one of them is under the attacker's control.§4.4 The attacker wants an authorization code or an access token for an uncompromised server, and gets it by tricking the client into sending those credentials to the attacker's server instead.§4.4 The attacker can gain that position, for example, by using dynamic registration to register the client at their own authorization server, or because an authorization server becomes compromised.§4.4

A client that can only interact with one authorization server needs no mix-up defence, but one that interacts with two or more must prevent the attack.§4.4.2 For each authorization request the client must store the issuer it sent the request to, the identifier of the server it meant to use.§4.4.2 In the defence the RFC prefers, the authorization server sends its issuer identifier in the response, and the client must compare the two and abort on a mismatch.§4.4.2.1

Not the same as phishing a password or stealing a token from the honest server. In the RFC's walk-through the honest server issues its code to the right client, and the client is the party fooled, into redeeming that code at the attacker's token endpoint.

02

How does Mix-up attack work?

The RFC's walk-through has four parties: the user's browser, the client, an honest authorization server and one operated by the attacker. It assumes the client is registered with both servers, stores the user's choice of server in a session bound to the browser, and uses the same redirection address (a URI, or Uniform Resource Identifier) for each.§4.4.1

Figure steps
  1. The user picks the attacker's server
  2. The client records the choice and redirects
  3. The attacker bounces the browser to the honest server
  4. The honest server issues a code
  5. The client redeems the code at the wrong server
  6. The attacker uses the code
Fig. 1

The honest server does its job correctly; the client, still remembering the attacker's server, carries the honest server's code to the attacker.

Drawn from RFC 9700, section 4.4.1

Swipe for the full figure →

  1. The user picks the attacker's server

    The user starts the sign-in using the attacker's authorization server, for example by clicking a button on the client's website.§4.4.1 In a variant, the user picks the honest server, and an attacker who can intercept that first request changes the selection.§4.4.1

  2. The client records the choice and redirects

    The client stores in the user's session that the user selected the attacker's server. It then redirects the browser to that server's authorization endpoint, with the client ID (identifier) it holds there.§4.4.1

  3. The attacker bounces the browser to the honest server

    When the browser arrives, the attacker immediately redirects it to the honest server's authorization endpoint. In that request the attacker replaces the client's ID at the attacker's server with the client's ID at the honest server.§4.4.1

  4. The honest server issues a code

    The user authorizes the client to access their resources at the honest server. The RFC notes that a vigilant user might detect at this point that they meant to use a different server. The honest server issues a code and sends it, via the browser, back to the client.§4.4.1

  5. The client redeems the code at the wrong server

    The client still assumes the code was issued by the attacker's server, so it tries to redeem the code at the attacker's token endpoint.§4.4.1

  6. The attacker uses the code

    The attacker now has the code. They can exchange it for an access token where the client is a public client, or use it in an authorization code injection attack, which the RFC describes in its section 4.5.§4.4.1

03

Why does Mix-up attack matter now?

In a November 2026 talk on the security of the Model Context Protocol (MCP), Delimarsky, one of its maintainers, listed safeguards he says came from seeing how people deploy MCP. Issuer validation against mix-up attacks was the only one he dated, and he dated it to the latest version of the specification.1 We read the late date as a reminder that a protocol can be in production use before this check reaches its specification.

A close relative of the attack sits outside the browser redirect. Paktiti, writing at WorkOS, argues that RFC 9207 fixes the mix-up inside the authorization response, which token exchange (RFC 8693) does not have.2 Her case is a flaw in n8n, tracked as CVE-2026-59208 (CVE stands for Common Vulnerabilities and Exposures). By n8n's own advisory, with more than one trusted token-exchange issuer configured, n8n matched external identities to local accounts by the token's sub claim alone and ignored iss, the issuer.2 A valid token from one issuer could sign in as a user with the same sub under another, and versions 2.27.4 and 2.28.1 fix it.2

The rule for the redirect case has been written down since RFC 9207. Every server that supports that RFC must name itself in an iss parameter on each authorization response, error responses included, and the client must compare the value with the issuer it sent the request to.3 Its authors say a client that talks to only one authorization server is not vulnerable, but becomes vulnerable once it adds a second.3

04

Where does it fit?

Compared withHow Mix-up attack differs
OAuth 2.0 Authorization Server Issuer IdentificationIssuer identification (RFC 9207) is the defence, where the mix-up is the attack. The authorization server names itself in an iss parameter on each authorization response, and the client rejects a mismatch.3 RFC 9700 calls it "a robust and relatively simple defense against mix-up".§4.4.2.1
Dynamic Client RegistrationDynamic client registration is an OAuth feature, and the mix-up attack can abuse it. RFC 9700 gives it as an example of how an attacker gets a server of their own in front of a client: the attacker uses dynamic registration to register the client at the attacker's authorization server.§4.4
05

What goes wrong?

  • Storing only the authorization server's address is not enough to identify a mix-up. An attacker might declare an honest server's authorization endpoint as their own, and pair it with a token endpoint under their control.§4.4.2
  • Giving each issuer its own redirect URI is the weaker defence. It cannot be used where a client registers once for many issuers, as in some open banking schemes. An attacker might also get round it by registering a new client with the honest server, using the redirect URI the client assigned to the attacker's server. The RFC says this defence should be used only if other options are not available.§4.4.2.2
  • The attack has variants. In the implicit grant the attacker receives an access token instead of a code, and some variants can be used against OpenID Connect.§4.4.1
  • The iss value is not cryptographically protected. RFC 9207's authors argue it does not need to be, but the RFC does require that a client must not let two authorization servers use the same issuer identifier.4
  • The issuer check lives in the authorization response. Paktiti's point is that token exchange has no such response, so in that grant the token endpoint itself has to tie each signing key to its issuer.2
06

What should a security leader ask?

  1. 01

    Which of our applications and agents can sign users in through more than one authorization server, and who is able to add a new one?

  2. 02

    For each of those clients, does it store the issuer it sent every authorization request to, and compare it with the issuer in the response before it redeems the code?

  3. 03

    Do the authorization servers we depend on send the RFC 9207 iss parameter on every authorization response, error responses included?

  4. 04

    Where we accept tokens from several issuers outside the redirect flow, such as token exchange, do we match accounts on issuer and subject together and never on subject alone?

  5. 05

    Does any client rely only on distinct redirect URIs as its mix-up defence, and what stops it from moving to the issuer check?

07

Sources

›Evidence: 4 claims from 3 briefings
  1. 1BI-FIND-2026-2698 · An admin can connect an MCP server once so staff see no consent prompt, a maintainer saysBy Delimarsky's account, MCP has moved authorization twice since its first release in November, which let each developer "carve out your own adventure". The March 2025 release moved to OAuth 2.1 but made the MCP server its own authorization server, so whoever built the server also handled discovery, sign-in, single sign-on and token management, which he calls problematic. The June release later that year handed that job to the enterprise's identity provider ("how about you leave that to the professionals?"), so an Okta shop uses Okta and a Microsoft shop uses Entra ID. The safeguards he says came from seeing how people deploy MCP include per-client consent, added because production deployments hit confused-deputy cases; audience validation, so a server does not pass a token on; and issuer validation against mix-up attacks, the only one he dates, to the latest version of the spec. Our own reading of the spec texts finds the MCP server defined as an OAuth resource server with the authorization server out of scope, and authorization itself optional.
  2. 2BI-FIND-2026-1887 · RFC 9207's issuer check stops at the redirect, and n8n's token-exchange flaw sat just past itPaktiti's argument is that RFC 9207 fixes the mix-up attack inside the authorization response, which token exchange (RFC 8693) does not have, and she says the JWT bearer grant (RFC 7523) and the SAML 2.0 bearer grant (RFC 7522) share that shape. In those grants the token endpoint itself has to tie each signing key to its issuer and match sub only against accounts under the issuer it confirmed. Her case is n8n's CVE-2026-59208, which she describes as a flat pool of trusted keys: the signature matched a trusted key, and nothing confirmed that the key belonged to the issuer the sub claim was supposed to come from. n8n's own advisory, GHSA-mq3m-f8x3-579w, puts the flaw in the account lookup instead, and our account follows the advisory: with more than one trusted token-exchange issuer configured, n8n matched external identities to local accounts by the JWT sub claim alone and ignored iss, so a valid token from one issuer could sign in as a user with the same sub under another. Only instances with token exchange turned on and more than one trusted issuer were exposed; versions 2.27.4 and 2.28.1 fix it, and until an upgrade the advisory suggests dropping to one trusted issuer or turning token exchange off. The rule was already written down: our briefing on RFC 8725 found the JWT best-practice RFC requires that a JWT's keys belong to its issuer.
  3. 3BI-FIND-2022-0004 · RFC 9207 has OAuth servers name themselves in each response; clients must refuse a missing name only where they expect oneRFC 9207 defends OAuth clients that use several authorization servers against the mix-up attack, in which an attacker who controls one of those servers can obtain codes or access tokens issued by another. The RFC names two ways an attacker gets that control: a server is compromised, or the attacker registers their own, for example through dynamic client registration. The fix is that every server supporting the RFC MUST name itself in an iss parameter on each authorization response, error responses included. The client MUST compare that value, by simple string comparison, with the issuer it sent the request to, and on a mismatch MUST reject the response and not proceed with the grant. The authors say a client that talks to only one authorization server is not vulnerable, but becomes vulnerable once it adds a second.
  4. 4BI-FIND-2022-0006 · RFC 9207 has OAuth servers name themselves in each response; clients must refuse a missing name only where they expect oneThe iss value is not cryptographically protected, and the authors argue it does not need to be. In a mix-up attack the client generally receives the response from an uncompromised server, and an attacker able to tamper with that response "would also have direct access to the authorization code", so integrity protection is not needed against this attack. Where a response already carries a checked issuer by other means, such as an ID Token returned with response_type=code id_token, or JARM, using iss "MAY be omitted". The RFC does require that clients MUST NOT let two authorization servers use the same issuer identifier, and that hand-configured clients keep each server's accepted iss values unique.

›In our briefings

What our briefings say about Mix-up attack itself, with the most direct claims first.

  1. A client that can work with more than one authorization server is REQUIRED to defend against mix-up attacks. The attack assumes one of those servers is under the attacker's control, which the RFC says can happen, for example, when the attacker registers the client at their own server through dynamic registration, or when a server is compromised. In its walk-through the user picks the attacker's server, the attacker forwards the request to the honest server under the client's ID there, and the client, still believing the attacker's server answered, redeems the honest server's code at the attacker's token endpoint. Clients should check the iss parameter (RFC 9207) or an issuer value such as the ID Token's iss claim. Distinct redirect URIs per server also work, but the RFC says that defence "SHOULD therefore only be used if other options are not available".

    RFC 9700 bans OAuth's password grant and loose redirect matching; binding access tokens stays a SHOULDBI-FIND-2025-0353

  2. Paktiti's argument is that RFC 9207 fixes the mix-up attack inside the authorization response, which token exchange (RFC 8693) does not have, and she says the JWT bearer grant (RFC 7523) and the SAML 2.0 bearer grant (RFC 7522) share that shape. In those grants the token endpoint itself has to tie each signing key to its issuer and match sub only against accounts under the issuer it confirmed. Her case is n8n's CVE-2026-59208, which she describes as a flat pool of trusted keys: the signature matched a trusted key, and nothing confirmed that the key belonged to the issuer the sub claim was supposed to come from. n8n's own advisory, GHSA-mq3m-f8x3-579w, puts the flaw in the account lookup instead, and our account follows the advisory: with more than one trusted token-exchange issuer configured, n8n matched external identities to local accounts by the JWT sub claim alone and ignored iss, so a valid token from one issuer could sign in as a user with the same sub under another. Only instances with token exchange turned on and more than one trusted issuer were exposed; versions 2.27.4 and 2.28.1 fix it, and until an upgrade the advisory suggests dropping to one trusted issuer or turning token exchange off. The rule was already written down: our briefing on RFC 8725 found the JWT best-practice RFC requires that a JWT's keys belong to its issuer.

    RFC 9207's issuer check stops at the redirect, and n8n's token-exchange flaw sat just past itBI-FIND-2026-1887

  3. RFC 9207 defends OAuth clients that use several authorization servers against the mix-up attack, in which an attacker who controls one of those servers can obtain codes or access tokens issued by another. The RFC names two ways an attacker gets that control: a server is compromised, or the attacker registers their own, for example through dynamic client registration. The fix is that every server supporting the RFC MUST name itself in an iss parameter on each authorization response, error responses included. The client MUST compare that value, by simple string comparison, with the issuer it sent the request to, and on a mismatch MUST reject the response and not proceed with the grant. The authors say a client that talks to only one authorization server is not vulnerable, but becomes vulnerable once it adds a second.

    RFC 9207 has OAuth servers name themselves in each response; clients must refuse a missing name only where they expect oneBI-FIND-2022-0004

Cited in 5 briefings

Every briefing that discusses this term, newest first.

  1. An admin can connect an MCP server once so staff see no consent prompt, a maintainer says

    Video · · Agentic AI Foundation · Nov 16, 2026

  2. RFC 9207's issuer check stops at the redirect, and n8n's token-exchange flaw sat just past it

    Article · · WorkOS · Maria Paktiti · Jul 20, 2026

  3. RFC 9700 bans OAuth's password grant and loose redirect matching; binding access tokens stays a SHOULD

    Article · · IETF (RFC Editor) · Torsten Lodderstedt et al. · Jan 2025

  4. In GNAP (RFC 9635), a client is known by its key, and tokens stay key-bound unless the server flags them bearer

    Article · · RFC Editor · Justin Richer et al. · Oct 1, 2024

  5. RFC 9207 has OAuth servers name themselves in each response; clients must refuse a missing name only where they expect one

    Article · · RFC Editor · Karsten Meyer zu Selhausen et al. · Mar 1, 2022

Related terms

What appears alongside Mix-up attack in the same briefings.

OAuth 2.0 Authorization Server Issuer IdentificationDynamic Client Registration

Was this explainer useful?

Share this explainer

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem that involves Mix-up attack? Talk to Boston Identity