Skip to content
Account takeover Write-up Intermediate

How i was able to delete any user account i wanted from the application :)

The application did not properly handle null bytes in email addresses during registration, allowing an attacker to create a new account with an email that already existed. This resulted in the original account being overwritten and effectively deleted, and the attacker could then receive password reset links intended for the victim.

mustafamahmvd Follow

Published on medium.com

today i will talk about how i found a bug that let me delete any user i wanted on the application. the idea was simple but it’s effectiveness was never simple :)

aiden0x, 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

Impact

An attacker could delete any user account by overwriting it with a new account using the same email, and then receive password reset links intended for the victim, effectively taking over the account.

What the attacker needed

Knowledge of victim's email; no account required

How it was found

  1. Register a new account with a null byte appended to the victim's email address in the JSON request.
  2. The application creates a new account with the victim's email, overwriting the original account.
  3. Attempt to log in with the victim's original password, which fails because the account no longer exists.
  4. Request a password reset for the victim's email, which sends a reset link for 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.

A null byte is a special character that some programs treat as the end of a string. The website checked if an email already existed, but when a null byte was added, the check failed to find the existing account, so it created a new one with the same email. This overwrote the original account, deleting it, and the attacker could then take over the victim's password reset process.

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 mustafamahmvd

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.