Skip to content
XSS Disclosed report Intermediate

Passive stored XSS at broadcast room

A specially crafted app name containing a pipe character could inject a javascript: link into the chat header's app list, allowing stored cross-site scripting when a victim clicked the link. An attacker could then execute JavaScript in the victim's browser and take over their account.

skavans Follow

Originally disclosed on HackerOne

High 8.9 View original
  • Triaged in 8 hours
  • Fixed in 29 hours
  • Paid in 8 hours
  • Disclosed after 23 days

Summary by the program

The hacker found that a specially crafted app names could insert a small amount of data into an A tag's href in the "Broadcaster is running these apps: " chat text. Because of the character limit this required multiple successive clicks on different app names, and in the example utilised the room subject. Due to this and that the broadcaster would be required to use specially crafted apps, the scope of attack is limited. We quickly resolved this issue.

Summary by the researcher

##Summary## Hey team,

I have discovered the passive stored XSS at broadcast room page. The vulnerable component is the running application link at the chat header.

JS function start_defchat contains object with many different parameters and the interesting one is app_info_json. This parameter contains information about applications running in the following format:

APP1_NAME|APP1_DETAILS_LINK,APP2_NAME|APP2_DETAILS_LINK

This parameter is used to construct the chat header part containing the information about broadcaster's running applications. Please look at the screenshot below: . When the parameter is injected into the page source, the | symbol is unfiltered so an attacker can craft application with malicious name containing this symbol to forge the app link to the javascript protocol one. So crafting the app with name something|javascript:alert(), the following app_info_json parameter modification becomes possible:

something|javascript:alert()|APP1_DETAILS_LINK,APP2_NAME|APP2_DETAILS_LINK

In the case above, the chat header is modified to contain the following DOM element:

HTML
<p>You are running these apps: <a href="javascript:alert()" target="_blank">1</a></p>

The problem is that the app name length is limited to 32 symbols, that is not enough to craft real world evil XSS-payload. It can be bypassed if the attacker puts the JS-code in some other HTML-element under his control and then just reads and executes it from the evil link. Nevertheless, I could not construct so small payload to even read and execute text of some element. So I have split the payload into two and used two applications to execute it. In this case, the victim should click two links one after another, that decreases the vulnerability risk a little. Though I have add the notification code in my app that writes every 10 seconds that you can earn free tokens if click at both links :)

Steps To Reproduce:

  1. Change your room title to alert('XSS by skavans at ' + document.domain)
  2. Create and run some dummy app/bot with name 1|javascript:b='#roomtitle';0
  3. Create and run second bot with name 2|javascript:eval($(b).text())
  4. Start broadcasting and open the room using another account (victim)
  5. Click at link 1, then at link 2. The xss will fire after that.

P.S.: The XSS fires at latest Chrome and Safari under Mac OS and does not work at the latest Firefox because of target="_blank" link's attribute. The Firefox opens new page after user clicks at such link so it is impossible to click at the second link.

The payload is now injected into the following password-protected room: https://chaturbate.com/b/h1tester1/ (password is hackerone).

Impact

Get full control under victim's account.

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

Root cause

The application name was inserted into an anchor's href without proper sanitisation, and the pipe character used as a delimiter was not filtered, allowing a javascript: URL to be injected.

Impact

An attacker could gain full control of the victim's account, though the attack required the victim to click two links and only worked in Chrome and Safari, not Firefox.

What the attacker needed

Attacker can create and run apps; victim clicks two links in sequence; victim uses Chrome or Safari (not Firefox)

The fix

The issue was quickly resolved by the team.

How it was found

  1. Change the room title to a JavaScript alert payload.
  2. Create and run a dummy app with a name that stores a reference to the room title.
  3. Create and run a second app with a name that evaluates the stored text.
  4. Start broadcasting and open the room as a victim using another account.
  5. Click the first link, then the second link, to trigger the XSS.

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.

When a website shows a list of apps, it builds a link for each app. The site failed to clean the app name properly, so an attacker could make the link start with 'javascript:' instead of a normal web address. Clicking such a link runs code in the victim's browser, which can let the attacker control the victim's account.

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 skavans

View all

8 more disclosed reports, best first.

More from Chaturbate

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.