Skip to content
Account takeover Write-up Advanced

CVE-2026-59208: Cross-Issuer Account Takeover in n8n

n8n's token-exchange flow verified JWTs against the correct issuer but mapped the verified token to a local account using only the JWT sub claim, ignoring the issuer. An attacker holding a valid token from a second trusted issuer with a sub matching a victim's could log in as that victim.

strix.ai

Published on strix.ai

Strix pointed itself at n8n's token-exchange flow and found an identity-binding bug: two trusted issuers emitting the same sub map to the same local account. One trusted token could log you in as someone else.

The author, on strix.ai

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The identity-binding step keyed local accounts on the bare JWT sub claim without qualifying it by the token's issuer, so subjects from different trusted issuers collided.

Impact

An attacker with a valid token from a trusted issuer could take over another user's account, gaining access to their workflows, credentials and data.

What the attacker needed

Multiple trusted issuers configured; valid token from a trusted issuer; sub matching the victim's

The fix

The fix qualifies the subject with the issuer, using a provider id of sha256(issuer)::sub for every lookup and persisted identity; it was fixed in n8n 2.28.1 and 2.27.4.

How it was found

  1. Configure two trusted issuers with different signing keys.
  2. Exchange a token from issuer A to provision a local user.
  3. Exchange a token from issuer B carrying the same sub but a different email and name.
  4. Observe the second exchange resolve to the same local user, with issuer B's profile values synced onto that account.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A JWT is a signed token that proves who you are. n8n checked the signature correctly, but when deciding which local account the token belonged to it only looked at the subject value inside the token, not which identity provider issued it. So if two trusted providers both used the same subject value, one provider's token could open the other provider's account.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.