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.
- 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
- Go to https://www.drugs.com/account/register/ and create an account using an email you own.
██████
-
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.
-
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.
███
- 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):
-
Change the email back to the attacker's email.
-
Re-verify the new email by completing OTP verification and selecting "Trust this device for 1 month".
-
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
- Go to Sign Up page
- try to Sign up with the victim's email
- Note that the platform says that email's already used (while the original Owner of the email didn't create the account)
███████
Impact
Summary:
-
** Loss of Trust:** Users will lose confidence in the platform's security if they learn attackers had impersonated them.
-
Impersonation Risk: Attackers can impersonate legitimate users and interact with the platform.
-
Email Ownership Not Protected: The platform fails to verify the original owner of the email, allowing attackers to use it.
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
- Register an account with an email you control.
- Complete OTP verification and choose to trust the device for one month.
- Change the account email to the victim's address.
- Log out and log back in to confirm no OTP is requested.
- 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.