0-click Account Takeover (ATO) via Google Authentication
The application's Google authentication flow trusted client-supplied ID and email parameters, allowing an attacker to obtain an access token for any user. This enabled a zero-click account takeover of any victim's account.
Published on medium.com
This scenario highlights the severity of the vulnerability, demonstrating how an attacker can exploit the improper handling of OAuth tokens to perform a zero-click account takeover. The potential consequences include data breaches, loss of user trust, and significant reputational damage to Example.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 client-supplied identity fields (ID and email) in the OAuth request instead of validating the token issued by Google.
Impact
An attacker could take over any account without any user interaction, leading to a complete compromise of the victim's account.
What the attacker needed
Ability to intercept OAuth request; victim's email address
The fix
The server should validate the Google-issued token and derive the user identity from it, rather than trusting client-supplied ID and email fields.
How it was found
- Log in with Google.
- Intercept the OAuth request.
- Change the id field to any number.
- Change the email field to the victim's email address.
- Gain access 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 log in with Google, the app receives a token that proves who you are. Here, the app also accepted extra fields (ID and email) that the attacker could change freely, and it issued a valid token for whatever account those fields named. So an attacker could become any user without that user doing anything.
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.