Skip to content
Account takeover Write-up Intermediate

FULL ACCOUNT WILL DIE

The account sync endpoint accepted an email address already registered to another user, creating two accounts sharing one email. Enabling a PIN on the attacker account then locked the victim out, and a password reset on the victim's email logged the attacker into the victim's profile, effectively destroying the original account.

omaroymdm Follow

Published on medium.com

It started like any other day of bug hunting. I was exploring a target, just getting a feel for the application logic, when I stumbled upon a profile page.

Omar Mahmoud, on medium.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 backend did not enforce uniqueness on the email field and used the mutable email string, rather than an immutable internal ID, to identify accounts during login and password reset.

Impact

An attacker could take over another user's account and cause the original account to be permanently lost, with recovery made impossible after deleting the attacker account.

What the attacker needed

A free account; victim's email address known

The fix

The backend should enforce a unique constraint on email addresses and use immutable internal IDs for authentication and password reset flows.

How it was found

  1. Capture the account sync request in a proxy.
  2. Change the email field to an address already registered to another user and send it.
  3. Enable a PIN on the attacker account.
  4. Try to log in as the victim and observe the error.
  5. Perform a password reset for the victim's email and log in with the new password.
  6. Delete the attacker account to purge the shared email identifier.

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.

A website let a user change their email to one that already belonged to someone else, so two accounts ended up sharing the same email. Because the site used the email to decide who you are, the attacker could take over the victim's login and even make the original account disappear.

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.

More by omaroymdm

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.