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.
- 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
- Mallory creates an a1[email protected] email address, base64-encodes it, and sends Alice a link https://gratipay.com/~alice/emails/verify.html?email2=YTFpY2VAZm9vLmNvbQ~~&nonce=x
- When Alice opens the link, she sees a notification "The verification code for [email protected] is bad. Resend verification email"
- If she clicks the "Resend verification email" button, that fake a1[email protected] email will be automatically associated with her account, and a valid verification link will be sent there.
- Mallory opens her a1[email protected] inbox, gets the verification link, and sends it to Alice.
- 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.
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
- Mallory creates an email address that looks similar to Alice's and base64-encodes it.
- Mallory sends Alice a link to the verification page containing the encoded email and a nonce.
- Alice opens the link and sees a notification that the verification code is bad, with a 'Resend verification email' button.
- Alice clicks the button, which associates Mallory's email with her account and sends a verification link to it.
- Mallory receives the verification link and sends it to Alice.
- 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.