Race condtion & Logic Bug lead to Pre-ATO
The backend accepted an email change on a Google-linked account even though the frontend hid that option, and a race condition between two simultaneous change requests caused the victim's address to be confirmed instead of the attacker's. An attacker could then log in through Google and land in the victim's account, leaving the victim unable to sign up or recover it.
Published on medium.com
Hello everyone! In this write-up, I’ll share how I discovered a logic bug and a race condition that led to Pre-Account Takeover (Pre-ATO) in an application.
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 did not enforce that Google-linked accounts cannot change email, and the confirmation step stored the pending address in shared state that two parallel requests could overwrite.
Impact
An attacker could take over a victim's account without the victim doing anything, and the victim could not sign up or recover the address afterwards.
What the attacker needed
Attacker has a Google account; victim's email address is known; two requests sent in parallel
How it was found
- Sign up with your own Google account.
- Go to settings, modify your name and save, capturing the request.
- Duplicate the request and add one email parameter for the victim and one for the attacker.
- Send both requests in parallel from a repeater group to create a race.
- Both addresses receive a verification email; click only the attacker's link.
- The victim's address gets confirmed, so logging back in with Google lands in 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.
An account can be linked to an email address, and changing that address normally needs a confirmation link sent by email. Here the server let the change through even when the website's buttons hid it, and sending two changes at once confused the server about which address was confirmed. The attacker ended up owning the victim's email on the account, so the real owner could no longer use it.
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.