OAuth Misconfiguration Leads To Pre-Account Takeover(snapchat)
A Snapchat-owned domain allowed signing up with an email and password, then later signing up with the same email through Google, which logged the user into the existing account without proving ownership of the email. An attacker could pre-register an account using a victim's email and later gain access to it once the victim used the Google sign-up flow.
Hi guys, my name is Ahmed Mahmoud. I am a bug hunter.
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 site linked a Google sign-up to an existing unverified email/password account without requiring the email owner to confirm ownership first.
Impact
An attacker could pre-register an account on a victim's email and later share access to it once the victim signs up with Google, leading to account takeover.
What the attacker needed
Victim's email address known; victim later uses Google sign-up
The fix
The site should not attach a Google sign-up to an existing unverified email/password account until the email owner confirms ownership, for example by requiring email verification before linking.
How it was found
- Sign up with the victim's email using the normal email and password form, then log out.
- Sign up again with the same email using the Google option.
- Observe that the Google sign-up logs into the existing account and marks the email as verified.
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 create an account, the site should check that the email really belongs to you before letting anyone use it. Here, a person could create an account with someone else's email address, and later the real owner signing in with Google would be dropped into that same account. That means the first person keeps a way in, which is called account takeover.
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.