Skip to content
Account takeover Disclosed report Intermediate

Avoid "resend verification email" confusion

The verification page allowed an attacker to associate an arbitrary email address with a victim's account by tricking the victim into clicking a 'Resend verification email' button. The attacker could then verify that email and receive all of the victim's notifications.

s_p_q_r Follow

Originally disclosed on HackerOne

Bounty$1 Low View original
  • Triaged in under an hour
  • Fixed in 7 months
  • Paid in 7 months
  • Disclosed after 7 months

Let's assume Alice has a Gratipay account https://gratipay.com/~alice and an [email protected] email

  1. Mallory creates an a‎1‎[email protected] email address, base64-encodes it, and sends Alice a link https://gratipay.com/~alice/emails/verify.html?email2=YTFpY2VAZm9vLmNvbQ~~&nonce=x
  2. When Alice opens the link, she sees a notification "The verification code for [email protected] is bad. Resend verification email"
  3. If she clicks the "Resend verification email" button, that fake a‎1‎[email protected] email will be automatically associated with her account, and a valid verification link will be sent there.
  4. Mallory opens her a‎1‎[email protected] inbox, gets the verification link, and sends it to Alice.
  5. After Alice opens it, the email will be successfully verified, so Mallory will receive all Alice's notifications.

The way to fix:

You shouldn't give Alice a chance to accidentally add any emails to her account, without knowing that: on step 3 a verification link should be sent only if the email is already associated with the Alice's account. If no, there should be just an error message with no "Resend verification email" button.

The original report as published on HackerOne, by s_p_q_r. 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 'Resend verification email' action associated the email with the account without first checking that the email was already pending verification for that account.

Impact

An attacker could receive all of a victim's notifications by tricking the victim into clicking a button and then a verification link.

What the attacker needed

Victim clicks a crafted link; victim clicks 'Resend verification email'; victim clicks the verification link

The fix

The 'Resend verification email' button should only be shown and functional if the email is already associated with the account; otherwise, show an error without the button.

How it was found

  1. Mallory creates an email address that looks similar to Alice's and base64-encodes it.
  2. Mallory sends Alice a link to the verification page containing the encoded email and a nonce.
  3. Alice opens the link and sees a notification that the verification code is bad, with a 'Resend verification email' button.
  4. Alice clicks the button, which associates Mallory's email with her account and sends a verification link to it.
  5. Mallory receives the verification link and sends it to Alice.
  6. Alice opens the link, verifying Mallory's email, so Mallory receives all of Alice's notifications.

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 add an email to an account, the site usually sends a verification link to prove you own it. Here, the site let an attacker add their own email to someone else's account by making the victim click a button that looked harmless. The attacker then verified that email and could see the victim's notifications.

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 s_p_q_r

View all

14 more disclosed reports, best first.

More from Gratipay

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.