Skip to content
XSS Write-up Beginner

How I Found HTML Injection?

A trip-invitation feature accepted raw HTML in the message field and sent it inside the company's own email to the invited user. An attacker could place a styled heading and a button in that email so the recipient was redirected to an attacker-chosen site.

gitlime71 Follow

Published on medium.com

The target was a web application and it’s activity was about traveling and booking flights tickets. There was a feature that enables you to make a trip and send an invitations to another users to be in the same trip with you.

Raccoon, 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 invitation message was inserted into the outgoing email body without encoding or sanitising the user-supplied text.

Impact

The crafted button in a company-branded email could send the recipient to a phishing page or other malicious site, which the author claims could lead to account takeover.

What the attacker needed

A free account; ability to invite a user by email; victim clicks the button

How it was found

  1. Open the trip feature and start an invitation to another user.
  2. Enter the recipient's email address.
  3. Put HTML markup in the message field, including a heading and a button linking to an external site.
  4. Send the invitation and open the email that arrives.

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 whatever you type into an email without cleaning it, the text can be read as instructions by the email program instead of plain words. Here the message box accepted formatting and link code, so the email showed a real clickable button. Because the email came from the company, a recipient would likely trust it and click.

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 gitlime71

View all

3 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.