️Full Account Takeover Through Unsafe Google Linking With Perma
The application allowed account registration and email changes without verifying email ownership, and automatically linked Google OAuth identities based on matching email addresses. An attacker could pre-register a victim's email, wait for the victim to sign in with Google, then take over the account and lock the victim out permanently.
Published on medium.com
While testing an application’s authentication flow, I found an issue that could lead to full account takeoverand eventually lock the real user out of their account.
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
The application used the mutable email address as the identity anchor for linking accounts, instead of a stable OAuth provider identifier.
Impact
An attacker could achieve full account takeover and permanently lock the legitimate user out, with no reliable recovery path.
What the attacker needed
Attacker can register with any email; victim uses Google OAuth with same email; no email verification required
The fix
The application should require email verification before activating accounts, avoid automatic account merging based only on email, use Google's stable OAuth identifier for identity mapping, require verification for all email changes, and invalidate all active sessions after any identity-related…
How it was found
- The attacker registers an account using the victim's email address without any email verification.
- The victim later logs in using Google OAuth with the same email, and the system automatically links both identities.
- The attacker logs in with the original password and gains access.
- The attacker changes the account email to a new address without verification, which breaks password reset and updates the Google OAuth linkage.
- The attacker changes the password, invalidating the victim's active session.
- When the victim tries to log in again via Google OAuth, the system cannot map the identity, leaving the attacker in control.
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 an email address, the site should check that you really own it by sending a confirmation link. Here, it did not, so anyone could create an account using someone else's email. Later, when the real owner logged in with Google, the site saw the same email and merged the two accounts, letting the attacker keep control.
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.