Skip to content
Account takeover Write-up Intermediate

Unique OAuth Misconfiguration That Could Lead to Account Takeover

The application restricted changing the email address for Google OAuth accounts only in the frontend, while the backend accepted email changes for any account. An attacker with temporary access to an OAuth session could rebind the account to an attacker-controlled email, potentially leading to account takeover.

medium.com

Published on medium.com

I am Ankit Rathva and i am a student of MCA 2nd year, I am an ethical hacker and security researcher with a passion for finding logic, authorization, and data-integrity flaws in web applications. As a bug bounty hunter and red teamer, he combines hands-on testing, forensic analysis, and careful disclosure to help…

Ankit Rathva aka Gujarati Hacker, 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

Impact

An attacker with temporary access to an OAuth session could permanently rebind the account to an attacker-controlled email, potentially leading to account takeover and breaking authentication trust.

What the attacker needed

Temporary access to an OAuth session; ability to intercept HTTP requests; OTP verification completed

How it was found

  1. Create a normal email/password account and change its email while intercepting the request to see the format.
  2. Log in with the Google OAuth account and intercept a profile update request.
  3. Replace the request body with old and new email parameters, using an attacker-controlled new email.
  4. Forward the request and complete OTP verification.
  5. Observe that the OAuth account's email changed while it remained linked to 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.

When you log in with Google, the app trusts Google to confirm who you are. The app tried to stop Google users from changing their email address, but only hid the button on the website; the server still accepted the change. So someone who briefly got into a Google-linked account could swap the email to one they control and keep access.

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.