Skip to content
XSS Disclosed report Beginner

Stored XSS in username.slack.com

A stored cross-site scripting flaw existed in a Slack workspace's file upload area, where a crafted filename was rendered without proper encoding. An attacker could upload a file with a malicious filename so that JavaScript executes when a victim clicks the file title.

prakharprasad Follow

Originally disclosed on HackerOne

  • Triaged in 4 hours
  • Fixed in 4 hours
  • Paid in 4 hours
  • Disclosed after 5 months

Hi

There is a stored XSS in username.slack.com.

Steps to reproduce:

  1. Login to your Slack
  2. Goto "Create Private Group" and with any name and purpose
  3. Goto https://manish.slack.com/messages/group/files/
  4. Upload a file hitting upload icon (^) filename shall be "><img src=x onerror=alert(1);>.jpeg
  5. After file is uploaded click on the image or file title, JS will execute as the filename is considered as payload

I've attached the image showing XSS.

Thanks!

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

Likely the file name was inserted into the page without HTML-encoding, so markup in the name was treated as code.

What the attacker needed

A Slack account; ability to create a private group; victim clicks the crafted file title

How it was found

  1. Log in to Slack.
  2. Create a private group with any name and purpose.
  3. Open the group's files page.
  4. Upload a file whose name contains an image tag with an event handler.
  5. Click the uploaded file's title or image to trigger the script.

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.

XSS is when a site shows user-supplied text as page code. Here a file name containing HTML was shown unsafely, so the browser ran it as a script.

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 prakharprasad

View all

17 more disclosed reports, best first.

More from Slack

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.