Skip to content
XSS Disclosed report Intermediate

Cross-site scripting on algorithm collaborator

A WebSocket message used by the algorithm debugger did not encode HTML, so an attacker could inject raw HTML/JavaScript that executed in a collaborator's browser. The attacker could run JavaScript in the victim's browser.

irisrumtub Follow

Originally disclosed on HackerOne

Bounty$2,100 High View original
  • Triaged in 6 days
  • Fixed in 26 days
  • Paid in 6 days
  • Disclosed after 3.5 years

Hi again my favorite VDP team. I bring you 8th bug and 4th cross-site scripting. Currently trying to upload python code via self-serve data, not looking for XSS'es only, but they're a thing still, right?

Summary: By sending specially crafted websockets request attacker can run javascript in algorithm collaborator's web browser

Description: This is actually quite a funny bug. Some time ago when I was testing algo debugger, i noticed that there is a request to /algorithms/algoid/x which usually happens when i try to insert html's <img src=x>. But since some time your cloudflare became more strict and adding inline scripts in request might result in 403 Forbidden, so i remove them and try without them. But at that time i couldn't find the image that caused that request. I sent that to Chris. Today i was trying to test against debugger again. The purpose wasn't to find XSS, but i spammed XSS payloads alongside with some different stuff. And again that request to page X. And i noticed that debugger removed part of my payload which contained image. That's it! That should be the vulnerable place. However typing html entity in it didn't produce anything. And html was injected only on my side, not the other collaborator's. So i decided to take a look at the websocket request that sends it It turned out that HTML's <> and other entities were encoded. So i tried intercepting the websockets request and enter <img src=x onerror=alert(1)> and it worked not only on me, but on collaborator as well. So is it TogetherJS library that is in charge of websockets? I think you might need to encode payloads server-side to avoid this kind of things. I would be glad to help you test the fix for this.

Steps To Reproduce:

  1. Intercept websockets message like this (debugger input update)
WS_message.png
WS_message.png From the original on HackerOne
  1. Replace value with raw html/javascript
  2. Send the message. Payload will work in collaborator's browser

Test account information

[email protected] [email protected]

Impact

Run javascript in victim's browser

The original report as published on HackerOne, by irisrumtub. 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 JavaScript in a collaborator's browser, though Cloudflare may block some inline script attempts with a 403.

What the attacker needed

Access to the algorithm debugger; a collaborator viewing the same session; ability to intercept WebSocket messages

The fix

The reporter suggests encoding HTML in WebSocket messages server-side to prevent this.

How it was found

  1. Intercept a WebSocket message that updates the debugger input.
  2. Replace the value with raw HTML or JavaScript.
  3. Send the message; the payload executes in the collaborator's browser.

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.

WebSockets are a way for a web page to keep a live connection to a server. Here the server passed along whatever text a user typed without cleaning it, so a malicious user could send HTML and JavaScript that another user's browser would run.

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 irisrumtub

View all

4 more disclosed reports, best first.

More from Quantopian

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.