Skip to content
OAuth / SSO Write-up Intermediate

I Found !! Full Account Takeover via OAuth Linking CSRF bugs

The application did not validate the OAuth state parameter when linking a Google account, so an attacker could attach their own Google account to a victim's session. The attacker could then log in as the victim and take over the account permanently.

medium.com

Published on medium.com

Halo semua, saya mau sharing bug Full Account Takeover lewat celah OAuth Linking CSRF yang baru saja masuk tahap Pending Program Review

Skysenz, 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 OAuth linking flow did not validate the state parameter against the user's session, allowing a cross-site request to bind an attacker-controlled Google account.

Impact

The attacker gains permanent full access to the victim's account, can bypass login, steal sensitive data and change account settings.

What the attacker needed

Victim is logged in; victim clicks an attacker link; attacker has a Google account

The fix

The OAuth linking flow should use a unique state value as an anti-CSRF token tied to the user's session.

How it was found

  1. The attacker starts linking a Google account and intercepts the callback URL containing the authorization code.
  2. The attacker copies the callback URL and drops the request so the code stays valid.
  3. The attacker builds a simple HTML page that auto-submits the callback URL.
  4. The victim opens the link while logged in, and the attacker's Google account is linked to the victim's 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.

When you link a Google account to a website, the site should check a secret code (called state) to make sure the request really came from you. Here the site skipped that check, so an attacker could trick your browser into linking the attacker's Google account to your profile. After that, the attacker can sign in as you.

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.