Skip to content
XSS Write-up Beginner

Stored HTML Injection in Emails

A profile name field accepted HTML and was rendered unescaped in emails, including group invite emails sent to other users. An attacker could place links or images in official emails to phish recipients or track opens.

medium.com

Published on medium.com

Hey folks, Sarv3shxploit here. I test sites and nudge teams to ship safer code.

Sarv3shxploit, 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 stored user-supplied HTML in the name field and inserted it into email templates without escaping it.

Impact

An attacker could send trusted-looking emails containing phishing links or tracking images to other users; scripts did not run because email clients strip them.

What the attacker needed

An account on the site; ability to create a group and invite users

The fix

The issue was fixed by the vendor after the report, as the payloads no longer rendered on re-test.

How it was found

  1. Change the account name to a value containing HTML markup.
  2. Trigger the account deletion OTP email and observe the name rendered as HTML.
  3. Create a group whose name contains HTML markup.
  4. Invite another user to the group and observe the group name rendered as HTML in the invite 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 saves text you type and later shows it on a page or in an email, it must treat that text as plain text, not as instructions for building the page. Here the site treated the name as HTML, the code that formats web pages, so a name could add a heading or a link. Because the email came from the real service, people were more likely to trust and click the 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.