Skip to content
XSS Write-up Beginner

Bug Bounty | HTML Injection in Email Invitations

The full name field of an email invitation was inserted into HTML-format invitation emails without sanitisation, so a user could place markup in it. An attacker could send legitimate-looking invitations containing their own links or images, which supports phishing.

medium.com

Published on medium.com

Hey hackers! In this blog, we will explore a vulnerability I discovered in a web application that allows users to send email invitations.

Fuzzyy Duck, 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

Impact

An attacker could embed their own links and images in emails sent from the company's domain, which could make phishing more convincing and may damage the domain's sending reputation; the text notes email clients do not run JavaScript, so the effect is limited to markup.

What the attacker needed

Ability to send invitations; victim opens the invitation email

How it was found

  1. Send an invitation request with markup in the full name field.
  2. Notice the request fails because unescaped double quotes break the JSON body.
  3. Resend with the quotes escaped so the JSON parses.
  4. Open the invitation email and see the link rendered as clickable.

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 a page or an email, it must treat it as plain text, not as instructions. Here the name typed into an invitation was treated as HTML, the language used to build web pages and formatted emails, so a link or image written in the name showed up as a real clickable link or picture. That lets someone send a genuine company email that quietly carries the attacker's own link.

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.