Say My Name: How I Turned an Innocent Profile Form into an HTML P
The Name field on a profile update form was not sanitised on the server, and the confirmation email rendered the name as raw HTML. An attacker could inject HTML into emails sent by the application, enabling phishing links or deceptive content.
As all know this might me known for many professional hacker like me (lol) but this writup might be very usefull for the new bug hunters.
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 server did not sanitise the Name field and the email template inserted user input without HTML escaping.
Impact
An attacker could inject malicious HTML into emails sent by the application, potentially enabling phishing links or deceptive buttons; some email clients might mishandle crafted HTML.
What the attacker needed
A user account; ability to update profile name
The fix
The application should sanitise user input on the server and escape it when rendering in email templates.
How it was found
- Go to the profile update page.
- Enter HTML markup into the Name field.
- Submit the update.
- Check the confirmation email and observe the HTML rendered.
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 type your name into a website, the site should treat it as plain text. Here, the site put the name directly into an email without cleaning it, so if the name contained HTML (the code that makes web pages), the email would show it as a real link or image. This lets an attacker make official-looking emails contain their own links.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.