Skip to content
XSS Disclosed report Intermediate

Twitter Card - Parent Window Redirection

A Twitter Card iframe allowed JavaScript to run inside it, and that script could redirect the parent window to an arbitrary site. An attacker could use a crafted shared URL to send a victim's browser to a different page.

batuhan Follow

Originally disclosed on HackerOne

Bounty$560 View original
  • Triaged in 2 hours
  • Fixed in 3 hours
  • Paid in 24 hours
  • Disclosed after 3 months

Hi, I was trying to find XSS on another website and I finally did.

After that I tried share this url on Twitter to show website owner, and noticed that I can run javascript on that iframe.

Javascript that I used on Twitter Card :

<script>top.window.location.href="https://google.com.tr"</script>

You can watch PoC

Attachments

Video_6-2-2015_00-48-46.mp4 From the original on HackerOne

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

A victim viewing a crafted shared link could be redirected from Twitter to an attacker-controlled page.

What the attacker needed

A URL with an XSS payload; victim views the shared link on Twitter

How it was found

  1. Find a website with an XSS vulnerability and craft a URL that runs JavaScript.
  2. Share that URL on Twitter so a Card preview is generated.
  3. Observe that the JavaScript runs inside the Card iframe and redirects the top window.

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 Twitter Card is the preview box that appears when a link is shared. The report says JavaScript placed in that preview could run and change the whole page, sending the viewer to another website. That is dangerous because the preview should not be able to control the main Twitter page.

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 batuhan

View all

1 more disclosed report, 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.