Please email me your password
The password reset form was vulnerable to SMTP header injection, allowing an attacker to add a BCC address and receive the victim's password reset email. The email contained the user's password in clear text, enabling account takeover.
Published on web.archive.org
I decided to do a write up about what I think is a unique account takeover bug that I recently found. I was really surprised on the ending and I must say I got extremely lucky as you’ll see later on.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application inserted user-supplied email addresses directly into email headers without sanitising newline characters, allowing injection of additional headers such as BCC.
What the attacker needed
A valid email address of a user; access to the password reset form
The fix
The application should sanitise user input to remove newline characters before using it in email headers, and should never send passwords in clear text.
How it was found
- Find a valid email address from an error message on the site.
- Go to the password reset page and enter the valid email address.
- Inject a BCC header by adding encoded newline characters and a second email address.
- Submit the form and receive the password reset email at the attacker's address.
- The email contains the user's password in clear text, which can be used to log in.
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 write-up has not been written yet. The Original tab links to the source.
When you ask a website to reset your password, it sends an email. The attacker found a way to trick the website into also sending a copy of that email to their own address. Because the email contained the actual password, the attacker could then log in as the victim.
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.