Skip to content
XSS Disclosed report Beginner

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.

akhil-reni Follow

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

  1. copy paste the following Link

https://twitter.com/intent/favorite/complete?tweet_id=572435913768366080&already_favorited=false&original_referer=javascript:alert%281%29;

  1. Click follow

  2. 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

twitterxss.png
twitterxss.png From the original on HackerOne

The original report as published on HackerOne, by akhil-reni. 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

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

  1. Open the crafted intent URL that contains a javascript: value in original_referer.
  2. Click follow on the intent page.
  3. 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.

More by akhil-reni

View all

13 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.