Skip to content
XSS Disclosed report Beginner

XSS found on Snapchat website

A reflected cross-site scripting flaw existed on a Snapchat profile page because the username taken from the URL was inserted into several HTML tags without proper encoding. An attacker could craft a link that, when opened on a mobile browser, would run JavaScript in the victim's session or alter the page's appearance.

esnard Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 2.2 years

Hi Snapchat Team,

I've found a reflected XSS vulnerability on this page: https://www.snapchat.com/add/snapchat

Example: https://www.snapchat.com/add/%22%3E%3Ch1%3EXSS%3C%2Fh1%3E

Note: you should visit the page with a mobile user-agent since the server displays different information based on the User-Agent HTTP header sent by the browser.

There are 6 places where the username isn't protected against XSS attacks:

  • 4 meta tags: twitter:title, twitter:image, og:title, og:image
  • 1 object tag: snapcode
  • 1 h2 tag: username

This could lead to JavaScript execution, UI redressing or open redirects.

The original report as published on HackerOne, by esnard. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the username path segment was inserted into HTML attributes and text without output encoding or validation.

Impact

This could lead to JavaScript execution, UI redressing or open redirects, though the report does not demonstrate a full exploit.

What the attacker needed

Victim clicks a crafted link; mobile user-agent

How it was found

  1. Open the Snapchat add page with a mobile user-agent.
  2. Replace the username in the URL with a crafted value containing HTML markup.
  3. Load the modified URL and observe the injected markup in the page.

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 report has not been written yet. The Original tab links to the source.

When a website puts part of the address bar straight into the page without cleaning it first, an attacker can add extra code to the link. If a victim clicks that link, the code runs as if the website itself had written it. This is called reflected cross-site scripting, or XSS.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Snapchat

View all

The newest disclosed reports for this program.

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.