Skip to content
Account takeover Disclosed report Intermediate

2FA Bypass leads to impersonation of legimate users

The email change kept the existing trusted-device session, so an attacker could register with their own email, trust the device, then switch the account email to a victim's address and impersonate them until the real owner reset the password.

d3do Follow

Originally disclosed on HackerOne

High 7.5 View original
  • Fixed in 31 days
  • Disclosed after 3 months

Summary:

Hello team, I have discovered a logic flaw in the authentication system that allows an attacker (User A) to impersonate a legitimate user (User B) who has not yet registered. By abusing the email change functionality and bypassing 2FA, the attacker can retain access to the account until the legitimate user resets their password.

Steps to re-produce

  1. Go to https://www.drugs.com/account/register/ and create an account using an email you own.

██████

  1. Complete OTP verification and select "Trust this device for 1 month". This gives you a valid session that does not require 2FA for one month.

  2. Go to https://www.drugs.com/account/details/ and change the email to the victim's email (User B)

    • Now, the attacker has a valid session associated with User B's email for one month, bypassing 2FA.

███

  1. Log out and log back in to confirm that the application doesn't prompt for OTP.

To maintain this bypass indefinitely (until the original user resets the password):

  1. Change the email back to the attacker's email.

  2. Re-verify the new email by completing OTP verification and selecting "Trust this device for 1 month".

  3. Change the email back to the victim's email (or any other arbitrary email).

By repeating this process, the attacker can retain access without triggering 2FA. Note that the platform only notifying the attacker to activate the account , but not Terminating the session after the email has changed successfully

From victim POV

  1. Go to Sign Up page
  2. try to Sign up with the victim's email
  3. Note that the platform says that email's already used (while the original Owner of the email didn't create the account)

███████

Impact

Summary:

  1. ** Loss of Trust:** Users will lose confidence in the platform's security if they learn attackers had impersonated them.

  2. Impersonation Risk: Attackers can impersonate legitimate users and interact with the platform.

  3. Email Ownership Not Protected: The platform fails to verify the original owner of the email, allowing attackers to use it.

The original report as published on HackerOne, by d3do. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the email change flow neither re-verified ownership of the new address nor invalidated the trusted-device session, so the trusted session carried over to the new email.

Impact

An attacker could impersonate a legitimate user and interact with the platform under their email until the real owner reset the password; the report does not show any server-side check that stopped this.

What the attacker needed

Attacker has an email address they control; victim has not yet registered; attacker completes OTP once

The fix

The email change should end existing sessions and trusted-device status once the address changes.

How it was found

  1. Register an account with an email you control.
  2. Complete OTP verification and choose to trust the device for one month.
  3. Change the account email to the victim's address.
  4. Log out and log back in to confirm no OTP is requested.
  5. To keep the bypass, switch the email back to your own, re-verify and trust the device again, then switch to the victim's email.

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 report has not been written yet. The Original tab links to the source.

When you log in with a second factor, a site can remember your device so you skip that step for a while. Here, changing the account's email address did not cancel that trust. So someone could point the account at another person's email and keep using it as if they were that person.

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 d3do

View all

1 more disclosed report, best first.

More from Drugs.com

View all

The newest disclosed reports for this program.

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.