Skip to content
Account takeover Write-up Intermediate

Critical Logic Flaw Allows Overwrite of Any User Account

The email update feature did not properly validate duplicate email addresses, so an attacker could submit both a victim's email and their own in the same request. By changing one character of the victim's email to uppercase, the duplicate check was bypassed and the victim's account was overwritten.

elcapitano7x Follow

Published on medium.com

While conducting web application testing, I focused on the email and password update sections, particularly the email update functionality. This feature is crucial as it contains a critical vulnerability that can lead to the overwriting of any user account.

Elcapitano, 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 server compared email addresses case-sensitively and only checked the first of several duplicate form fields, so a differently-cased victim address passed the uniqueness check and was then written over the victim's record.

Impact

An attacker could overwrite any user's account, which the author describes as taking control of it.

What the attacker needed

Ability to submit the email update request

The fix

The application should normalise email addresses before comparison and enforce strict rules on email updates, rejecting requests with multiple email fields.

How it was found

  1. Try adding the victim's email in the normal interface and observe the 'email already exists' error.
  2. Modify the request to include two email fields, the victim's first and the attacker's second.
  3. Change one character of the victim's email to uppercase and resend the request.
  4. Observe that the victim's account is overwritten.

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 change your email address on a website, the site should check that the new address is not already used by someone else. Here the check could be fooled: the attacker sent two email addresses at once and changed the capitalisation of the victim's address, so the site thought it was a different address. The result was that the victim's account details were replaced with the attacker's.

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 elcapitano7x

View all

4 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.