X / xAI · Report #119471
DOMXSS in Tweetdeck
How it was found
Hi, I would like to report a DOMXSS issue in TweetDeck.
#Details In Tweetdeck, a tweet contains info of what client (app) the user used to sent the tweet. The render process is vulnerable to DOMXSS.
In https://ton.twimg.com/tweetdeck-web/web/dist/bundle.6f91b4e832.js, the following line is responsible for retrieving the client website:
case "followSourceLink":
TD.util.openURL($(n.getMainTweet().source).attr("href"));
break;
where n.getMainTweet().source is the client name. This name can be controlled through changing the application name (picture attached), and arbitrary characters can be inserted (including angle brackets). Moving on, $() is a jQuery DOMXSS sink. If we inject a payload like <svg onload=alert(document.domain)> then XSS will be executed showing the executing domain.
So to sum up,
- Attacker creates an application where the app name is a XSS payload.
- Attacker uses the app to post a tweet, then the tweet contains a malicious info of which app the tweet is sent from
- Victim clicks on the app info and XSS triggers.
#PoC
- Make sure you are using latest IE (otherwise CSP kicks in)
- Follow @attackerfoobar or search for the user on TweetDeck
- Expand the first tweet, click "Click here to get followers ❤️" (which is a bait app name)
- XSS executes
Video demonstration is also attached.
#Fix
Probably sanitize n.getMainTweet().source before putting it into $().