Unescaped HTML in Email Templates — How I Turned a Simulator into a Phishing Vector
A message field in an email simulator accepted raw HTML and returned it unescaped in outgoing emails. An attacker could craft emails that look legitimate while hiding the real content, increasing phishing risk.
A message field in an email simulator accepted raw HTML and handed it straight back in the outgoing message. That shouldn’t happen.
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
Impact
An attacker could make phishing emails appear legitimate and hide the true message content, potentially tricking recipients into clicking links or trusting false information.
What the attacker needed
Access to the email simulator; ability to submit a message field
The fix
User input should be HTML-encoded before being placed into HTML emails, or rendered as plain text, or passed through a strict allowlist sanitizer if limited formatting is needed.
How it was found
- Confirmed the simulator rendered submitted HTML into outgoing email.
- Used a safe test address and non-malicious visible content to prove the visual effect.
- Captured screenshots and a short demo for the report.
- Filed a responsible disclosure with the private program and provided remediation advice.
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 a website takes text you type and puts it into a web page or email without cleaning it, your text can be treated as code. Here, the email simulator let people type HTML (the language of web pages) and then sent that HTML as-is. So someone could make an email look like a real company message, which is a common trick in phishing scams.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.