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.
- 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:
Steps to reproduce
- go to
https://www.twitterflightschool.com/student/award/████████?referer=javascript:alert(document.domain) - click in "X" button in top left of the screen
- XSS will be triggered
Impact
it is possible to perform malicious actions on the victim's account
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
- Open the award page URL with the referer parameter set to a javascript: value.
- Click the X button in the top left of the screen.
- 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.