Skip to content
XSS Write-up Beginner

I Found an $125 Email HTML Injection Just After My Previous Bug �

A return/exchange flow sent user-supplied name fields into a confirmation email without escaping them, so HTML placed in the first name field was rendered in the email. An attacker could send branded emails containing attacker-chosen links to any address, enabling content spoofing and phishing.

zer0figure Follow

Published on zer0figure.medium.com

This is a story of how I found an Email HTML Injection vulnerability — not by doing anything fancy — but by paying attention to a small detail that many testers usually ignore.

Zer0Figure, on zer0figure.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 email template inserted the user-supplied name value into the HTML body without escaping or sanitising it.

Impact

An attacker could send emails that look like they come from the trusted brand, containing attacker-chosen links, to any address, and with no rate limiting this could be repeated at scale for phishing; the text does not show script execution in the email.

What the attacker needed

A return/exchange flow that sends email; ability to submit a name field; victim opens the email

How it was found

  1. Start a return or exchange and intercept the GraphQL request that generates the return label and sends the email.
  2. Note that the firstName field appears to be reflected in the email content.
  3. Put a simple HTML heading in the name field and send the request.
  4. Open the received email and confirm the HTML was rendered rather than escaped.
  5. Replace it with a heading containing a link to an attacker-chosen site and send again.
  6. Confirm the email shows a clickable link from the trusted brand.

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 something you typed into an email, it should treat it as plain text. Here it did not, so a name like a heading tag was turned into real formatting and links inside the email. Because the email comes from the real company, a victim may trust a link the attacker chose.

What is XSS?

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

More by zer0figure

View all

11 more disclosed reports, best first.

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.