How a Password Reset Email Became a Phishing Link
The username field accepted raw HTML, and the password reset email rendered that username as HTML. Because signup did not verify email ownership, an attacker could register with a victim's email, store a phishing link in the username, and have it delivered inside a legitimate password reset email.
Published on medium.com
They are predictable, repetitive, and trusted — exactly the kind of message users are trained not to question. But that trust can quietly disappear when small assumptions in input handling and account creation collide.
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 username was stored and later inserted into the password reset email as raw HTML without encoding, and account creation did not verify that the user owned the email address.
Impact
An attacker could send a phishing link inside a trusted password reset email, which could lead to credential harvesting, personal information theft and social engineering, without email spoofing.
What the attacker needed
No email verification at signup; victim's email address known; victim requests a password reset
The fix
The username should be HTML-encoded wherever it is displayed, including in emails, and account creation should verify email ownership before the account is activated.
How it was found
- Register an account using the victim's email address, since ownership is not verified.
- Set a password and log in to the account.
- Update the username field with an HTML anchor tag pointing to an attacker-controlled site.
- Wait for the real email owner to try to register and be told the account already exists.
- The victim requests a password reset and receives an official email containing the attacker's clickable link.
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.
A website let people put HTML code (the language used to build web pages, including clickable links) into their username. That username was then placed, without being made safe, into the official password reset email. Since the site also let anyone sign up with someone else's email address, an attacker could make the real owner receive a trusted-looking email containing a link to a fake site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.