Skip to content
Account takeover Write-up Intermediate

OAuth Account Takeover (ATO) Vulnerability via Email Manipulation

The web application's Google sign-in flow generated a token that was linked to an email address supplied in the request, without verifying that the token belonged to that email. An attacker could change the email to any registered account and receive a login link for it, taking over the account.

medium.com

Published on medium.com

I’m Muhammed Galal, a cybersecurity researcher, currently working as a hunter on HackerOne, specializing in web application and mobile application penetration testing. Throughout my work, I’ve identified vulnerabilities within notable companies such as Xiaomi and Twitter.

Dg0x6, 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

Likely the server trusted the client-supplied EmailAddress parameter instead of deriving the email from the verified Google token.

Impact

An attacker could log in to any existing account on the site, including accounts they do not own.

What the attacker needed

A Google account; ability to intercept and modify requests; victim's email address known

How it was found

  1. Start the Google sign-in flow with an unregistered account and reach the account creation page.
  2. Capture the account creation request in an intercepting proxy and send it to the repeater.
  3. Change the EmailAddress parameter to an existing account's email and send the request.
  4. Observe a 200 OK response containing a login link for that account.
  5. Open the link in a browser to log in as the victim.

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 sign in with Google, the site receives a proof token from Google and should check which email that token belongs to. Here the site instead trusted an email address typed into the request, so anyone could swap in another person's email and get a login link for that person'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.