Skip to content
XSS Write-up Beginner

Email HTML injection with a simple tip

A newsletter subscription form reflected the submitted name into a confirmation email without sanitising HTML, so an attacker could inject a clickable link into the email. Because the name field was limited to 35 characters, the author used a URL shortener to fit a working link into the payload.

medium.com

Published on medium.com

While choosing target from Bugcrowd programs, I found old one with just 2 domains in scope and There is no self sign-up or parameters, it's like a dead end.

Spider4, 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 name value from the subscribe form was inserted into the confirmation email's HTML without encoding or sanitisation.

Impact

An attacker could place a clickable link in an email sent by the company, which a recipient might trust and follow; the text does not show any further exploitation.

What the attacker needed

Access to the public subscribe form; victim opens the confirmation email; name field limited to 35 characters

How it was found

  1. Find the subscribe form on the site and submit it with random data.
  2. Receive the confirmation email and notice the submitted name appears as HTML.
  3. Try a link payload and see it rejected because the name field allows only 35 characters.
  4. Shorten the destination URL and submit a short HTML link payload that fits the limit.
  5. Observe the clickable link rendered in the confirmation email.

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 back into a page or an email without cleaning it first, it may treat your text as code. Here the name field was placed into an HTML email, so a link written as HTML became a real clickable link in the message. A victim receiving that email could be sent to a site the attacker controls.

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.