XSS in original referrer after follow
The original_referer parameter in a Twitter intent URL was reflected into a link that could use a javascript: scheme, so an attacker could run script when the victim clicked 'return to previous site'. The attacker needed the victim to arrive with a null referrer, which a link with rel=noreferrer provided.
Originally disclosed on HackerOne
- Triaged in 9 hours
- Fixed in 37 hours
- Paid in 4 days
- Disclosed after 4 days
Hey hi,
There is a XSS in the intent functionality ,
Steps to reproduce
- copy paste the following Link
-
Click follow
-
now click return to previous site, you will see a xss triggered.
Requirements
- Make sure you pick a tweet of a user , that you don't follow.
- to execute you need to send a null referrer.
Here is the html code to attack victims
`<html> <a href="https://twitter.com/intent/favorite/complete?tweet_id=572435913768366080&already_favorited=false&original_referer=javascript:alert%281%29; " rel="noreferrer">click here and follow</a>
</html>`a rel=noreferrer will do our work.
Regards Wesecureapp
Attachments

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
Impact
An attacker could run script in the victim's Twitter session after the victim followed a crafted link and clicked through the intent flow, but the attack required a null referrer.
What the attacker needed
Victim clicks a crafted link; null referrer (rel=noreferrer); target tweet from a user not followed
How it was found
- Open the crafted intent URL that contains a javascript: value in original_referer.
- Click follow on the intent page.
- Click 'return to previous site' to trigger the script.
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 sometimes shows a 'return to previous site' link. Here that link was built from a value in the URL, and the value could start with javascript: instead of a normal web address. Clicking such a link runs code in the page, which is cross-site scripting (XSS).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.