Skip to content
XSS Write-up Beginner

HTML INJECTION- My Second Major Bounty

The registration form's name fields did not sanitise HTML, so injected markup was rendered in the confirmation email. An attacker could place a clickable link in that email and redirect the recipient to a malicious site.

medium.com

Published on medium.com

I was testing on the registering services of the target website, on the name section I tried my basic html payload:

Josekutty Kunnelthazhe Binu, 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 application inserted user-supplied name values into the email body without HTML-encoding or sanitising them.

Impact

An attacker could send victims a genuine-looking email from the company that redirects them to a malicious website, and could also spoof content or damage the company's reputation.

What the attacker needed

Ability to submit the registration form; victim opens the confirmation email; victim clicks the injected link

How it was found

  1. Enter an HTML heading tag in the first name and last name fields of the registration form.
  2. Submit the registration and open the confirmation email.
  3. Observe that the heading tag is rendered in the email.
  4. Replace the heading with an anchor tag pointing to an external site in the first name field.
  5. Register again and open the email to see a clickable link.
  6. Click the link and confirm it navigates to the external site.

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.

Some websites put what you type into a form straight into an email without cleaning it. If the form accepts HTML (the code that builds web pages), an attacker can add their own tags, such as a link. The victim then sees a real-looking email that sends them 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.