Skip to content
XSS Disclosed report Beginner

XSS via referrer parameter

The referer query parameter on a Twitter Flight School award page accepted a javascript: URL, which was placed into an anchor tag. An attacker could trick a victim into clicking a link and run script in the victim's session to perform actions on their account.

keer0k Follow

Originally disclosed on HackerOne

  • Disclosed after 6 months

Description

Hi, i would like to report an XSS via javascript scheme in https://www.twitterflightschool.com/student/award/[ID]?referer=, the payload e need just a click of user to be triggered because the link will be placed in a tag.

url:https://www.twitterflightschool.com/student/award/███?referer=javascript:alert(document.domain)

I attached a video demonstration:

Screen_Recording_2020-05-07_at_03.00.26.mov From the original on HackerOne

Steps to reproduce

  1. go to https://www.twitterflightschool.com/student/award/████████?referer=javascript:alert(document.domain)
  2. click in "X" button in top left of the screen
  3. XSS will be triggered

Impact

it is possible to perform malicious actions on the victim's account

The original report as published on HackerOne, by keer0k. 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 referer parameter was inserted into an anchor's href without validating that the scheme was safe, allowing a javascript: URL.

Impact

An attacker could perform malicious actions on the victim's account, but the victim must click the crafted link.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Open the award page URL with the referer parameter set to a javascript: value.
  2. Click the X button in the top left of the screen.
  3. The script runs.

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.

A web page took a value from the address bar and used it as a link without checking it. Because the value started with javascript:, clicking the link ran code in the browser instead of going to a normal website. That code runs as the logged-in user, so it can do things on their behalf.

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 keer0k

View all

5 more disclosed reports, best first.

More from X / xAI

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.