Skip to content
Business logic Write-up Intermediate

Username & Email Collision Leading to Account Lockout and identity collision☠️

The platform allows users to change their username to any string, including an email address that was previously used as a username by another account. Because login accepts either email or username, an attacker who knows a victim's email can claim it as their username, causing the victim's email-based login to resolve to the attacker's account and locking the victim out.

0xMo7areb Follow

Published on medium.com

A business logic flaw in the username lifecycle permits the reassignment of email-based usernames after they are changed by the original account owner. Because the platform allows authentication using either email or username — and initially sets the username equal to the email address — this creates an identity…

0xMo7areb 🥷, 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

The system treats a mutable, reusable username as an authentication identifier while also allowing login by email, creating ambiguous identity mapping.

Impact

The victim is permanently locked out of their account, and the report notes that in other implementations this could escalate to account takeover if password reset or verification flows are less strict.

What the attacker needed

Victim has changed username from email; attacker knows victim's email; attacker has an account

The fix

Authentication should resolve strictly against immutable identifiers such as an internal user ID or a permanently bound, verified email, with usernames used only as display aliases.

How it was found

  1. Victim registers with an email that also becomes their username.
  2. Victim changes their username to something else, freeing the email string as a username.
  3. Attacker registers or logs in to their own account.
  4. Attacker changes their username to the victim's email address.
  5. Victim can no longer log in using their email because it now resolves to the attacker'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, the site uses your email as your username. If you later change your username, the old email string becomes free for anyone to take as a username. Since the site lets you log in with either email or username, someone else can take your old email as their username, and then when you try to log in with your email, the site sends you to their account instead, locking you out.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0xMo7areb

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.