Skip to content
OAuth / SSO Write-up Intermediate

OAuth Misconfiguration Lead To 1-Click Account Takeover (ATO)

The OAuth account-linking flow did not properly validate the state parameter, so an attacker could remove it and still complete the link. By sending a crafted link, an attacker could link their own Google account to a victim's account and then log in as the victim.

medium.com

Published on medium.com

This write-up describes how can misconfigyration in oAuth flow can lead to ATO with one click from victim.

Mahmoud Gamal, on medium.com

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 server checked whether a state parameter was present but did not reject requests where it was missing, so the CSRF protection could be bypassed by deleting it.

Impact

An attacker could link their own OAuth identity to a victim's account with one click, leading to full account takeover if the attacker controls the linked identity.

What the attacker needed

Victim clicks a crafted link; attacker has a Google account; victim has an existing email/password account

How it was found

  1. Start linking your account with Google.
  2. Intercept requests until you see the request that returns the final token to link the account.
  3. Delete the state parameter and generate a CSRF proof-of-concept, then drop the request.
  4. Send the crafted link to a victim; their account becomes linked to your Google account, and you can log in as them using Google.

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.

OAuth lets you sign in to a site using another service like Google. The site should use a random 'state' value to make sure the login request really came from you. Here the site accepted a request with no state value at all, so an attacker could trick a victim into linking the attacker's Google account to the victim's account.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.