Skip to content
Account takeover Disclosed report Beginner

Account takeover due to misconfiguration

The report describes a flaw where email verification links sent during an email address change remain valid even after the user changes their email again and verifies the new address. An attacker who controls the originally mistyped email address could use the still-active link to verify and take over the account.

Akash Hamal Follow

Originally disclosed on HackerOne

  • Triaged in 2 days
  • Fixed in 6 months
  • Paid in 8 days
  • Disclosed after 7 months

Summary:

HI team, i hope you are good :)

Its a very simple logical flaw that results in this

So suppose we are [email protected] , now login into the website then

  1. go to account settings and then change mail address to [email protected]
  2. a link will be sent to [email protected], now the user realizes that he have lost access to [email protected] due to some reasons
  3. so he will probably change mail to the another mail address for e.g [email protected] which he owns and has access to
  4. but it is found that even after verifying [email protected], the old link which was sent to [email protected] is active, so user/attacker having access to that mail can verify it and takeover acc

In a nutshell :

It is mandatory for a web app to invalidate the tokens in time to secure its user

In this case, suppose while changing mail address the user mistakenly typed wrong mail address, so the link will be sent to that mail address.

So the user probably don't want the user of that mail address to verify it, so he will quickly change his mail address to one he owns and verify it

what he doesn't know is that even after verification(change of major state), the old link is still active

the flaw :

user changes mail to [email protected] -> user realizes that he mistyped the mail -> so he again changes to mail he owns and verifies it -> old link sent to [email protected] is still active even after new mail has been verified

Impact

An attacker can takeover acc due to misconfiguration, not invalidation of tokens at major state change, in time

The original report as published on HackerOne, by akashhamal0x01. 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 application does not invalidate previously issued email verification tokens when the email address is changed again or when a new verification occurs.

Impact

An attacker with access to the originally mistyped email address could use the still-active link to verify it and take over the account.

What the attacker needed

Victim mistypes email address; attacker controls the mistyped email

The fix

The application should invalidate previous email verification tokens in time.

How it was found

  1. Log in and go to account settings to change the email address to a new one.
  2. A verification link is sent to the new email address.
  3. Realising a mistake, change the email address again to another address you own and verify it.
  4. The old verification link sent to the first new address remains active and can still be used.

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 change your email address on a website, it sends a confirmation link to the new address. This report says that if you then change your email again, the first link still works. Someone who owns that first email address could click the link and confirm it, possibly taking over your account.

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 Akash Hamal

View all

10 more disclosed reports, best first.

More from Mattermost

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.