Skip to content
XSS Write-up Intermediate

HTML injection in snapshat email form$$$

The Snapchat Ads API accepted a display name containing HTML when adding an organisation member, and that value was inserted unescaped into the invitation email. An attacker could send a legitimate-looking Snapchat email carrying their own injected content and links to a chosen address.

medium.com

Published on medium.com

It started not with a bang, but with the quiet hum of a server rack and the familiar glow of a terminal. I was deep in an authorized penetration test of Snapchat's ecosystem, specifically their B2B advertising platform.

Aksoum Abderrahmane, 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 member display name was inserted into the invitation email template without output encoding, so markup in the field was rendered.

Impact

An attacker could send a genuine Snapchat-branded invitation email containing their own injected text and a link to a domain they control, which could be used for phishing.

What the attacker needed

Access to the Ads API with a bearer token; an organisation to add members to

The fix

The report says Snapchat added input sanitisation and output encoding, which was fixed.

How it was found

  1. Intercept the request that adds a member to an organisation on the Ads API.
  2. Change the request method from PUT to POST and set a new email address.
  3. Put markup and a link to an attacker-controlled domain in the display_name field.
  4. Send the request and open the invitation 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 something you typed into a page or an email, it must treat it as plain text, not as instructions. Here the display name was placed into an email without being cleaned, so text that looks like formatting or a link is rendered by the mail client. That lets someone make a real company email carry the attacker's message.

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.