Skip to content
Business logic Disclosed report Beginner

previous token seems to work even though it does not verify email

The email confirmation token does not expire after use and can be reused to confirm the same email address even after it has been changed and a new token issued. An attacker who obtains an old token could confirm an email address without access to the new token.

rashedhasan007 Follow

Originally disclosed on HackerOne

  • Fixed in 22 hours
  • Disclosed after 2.3 years

Hi there ,

Summery :

the same confirmation token can be reused for the email address , wheres the previous token and the new token are not same . while the user tries to confirm his email with previous token , it will be confirmed . which means that token does not expires .

Proof Of Concept:

  • Open your wakatime account with email [email protected].
  • a verification link arrives to your email address looking like this


https://wakatime.com/confirm_email/9ec1b0e0-6993-4dce-972f-73670d340557/764af9cc-766c-4d1c-ba13-cfaa00bdd9b8/2017-08-27T18:36:48Z/e4c09969934e90ecd2e81a5ea21e047a808a6cd9

  • verify your email address .
  • Now remove your email address and put any other email address like [email protected]
  • the system asks for to verify this , but without verifying we can also login .
  • Now if we use the previous email address the system will not let us log in .
  • however now login again with new email [email protected] and password .
  • change your email to previous one which is [email protected].
  • System prompts to verify , a new confirmation link arrives looking like this
https://wakatime.com/confirm_email/9ec1b0e0-6993-4dce-972f-73670d340557/764af9cc-766c-4d1c-ba13-cfaa00bdd9b8/2017-08-27T18:51:38Z/2d95b3756346f163507aee82a1324df280a17a39
  • here we observe the following part is different from our previous token , which shows the time frame and another unique generated part
2017-08-27T18:51:38Z/2d95b3756346f163507aee82a1324df280a17a39
  • So now instead of using the new token use the previous token and it confirms the email address .
  • This works every time you add your email
  • you can ignore all the new token and use the previous first one arrived at your address .
  • Which should expire after one use as the token are actually not same , they are different

Possible Remediation:

As mentioned a token should expire after single use . I tested it quite a few times and confirming it works as the PoC .

I hope you will look into this .

Sincerely , Rashed

The original report as published on HackerOne, by rashedhasan007. 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 confirmation token is not invalidated after first use and remains valid indefinitely.

Impact

An old confirmation token can still confirm an email address after the email is changed and a new token issued.

What the attacker needed

Access to an old confirmation token; ability to change account email

The fix

The confirmation token should expire after a single use.

How it was found

  1. Create an account with an email address and receive a confirmation link.
  2. Verify the email address using the link.
  3. Change the account email to a different address.
  4. Log in with the new email and change the email back to the original address.
  5. Receive a new confirmation link with a different token.
  6. Use the previous confirmation link instead of the new one to confirm the email address.

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.

A website sends a link to your email to prove it is yours. This report says an old link still works after you change your email and get a new link, so someone with an old link could confirm an address.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by rashedhasan007

View all

3 more disclosed reports, best first.

More from WakaTime

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.