From Pre-Account Takeover to Full Account Takeover using Google O
The application allowed an attacker to register an account using a victim's email address before the victim signed up. When the victim later signed up via Google OAuth, the attacker's original Google account remained linked to the victim's account, giving the attacker persistent access even after the victim set a password.
“بِسْ� ِ اللَّهِ، وَالْحَ� ْدُ لِلَّهِ، وَالصَّلَاةُ وَالسَّلَا� ُ عَلَى رَسُولِ اللَّهِ، اللَّهُ� َّ عَلِّ� ْنَا � َا يَنْفَعُنَا، وَانْفَعْنَا بِ� َا عَلَّ� ْتَنَا، وَزِدْنَا عِلْ� ًا” الله� انصرنا إخواننا ال� ستضعفين في فلسطين وفي كل � كان
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 application linked OAuth identities to existing accounts based solely on matching email addresses without verifying ownership, and failed to invalidate old OAuth links when the email was changed.
Impact
An attacker could gain persistent full control over a victim's account, even after the victim sets a password, by pre-registering with the victim's email and linking their own Google account.
What the attacker needed
Attacker has a Google account; victim has not yet registered; attacker knows victim's email
How it was found
- Log in with your own Google account to create an account.
- Change the account's email to the victim's email (before the victim has an account).
- When the victim signs up via Google OAuth, they are redirected to the attacker-created account.
- The victim sets their own password from the link sent to them.
- The attacker logs in using their original Google OAuth account and gains 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 sign up with Google, the site links your Google account to a new account. The bug was that an attacker could create an account with the victim's email first, and later the victim's Google sign-up would attach to that same account. The attacker's original Google login stayed linked, so they could log in as the victim even after the victim set a password.
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.