Skip to content
XSS Write-up Beginner

Simple Email HTML Injection to $250

A support contact form reflected user input into the HTML body of a confirmation email without sanitisation, so injected HTML tags were rendered. An attacker could place clickable links or a fake login form in a trusted system email to phish recipients.

medium.com

Published on medium.com

For Non-Members : Free Link

TSxNINJA, on medium.com

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 contact form input was inserted into the email's HTML template without escaping or sanitisation.

Impact

The rendered markup could carry clickable links to an attacker site or a fake login form inside a trusted email, enabling phishing and user manipulation; the text does not claim script execution.

What the attacker needed

Access to the public contact form; victim receives and opens the email

The fix

User input should be HTML-escaped before it is placed in email bodies, ideally through a templating engine that auto-escapes by default.

How it was found

  1. Open the target's support or contact page.
  2. Find the contact form on that page.
  3. Submit HTML markup in the form fields.
  4. Receive the confirmation email and observe that the markup was 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 a website puts what you typed into an email without cleaning it, your text can be treated as code that shapes the email. Here the contact form's input ended up inside the email's formatting, so a link the tester wrote became a real clickable link. That lets someone send a convincing fake message from the company's own address.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.