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.
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:
- Login to your Slack
- Goto "Create Private Group" and with any name and purpose
- Goto https://manish.slack.com/messages/group/files/
- Upload a file hitting upload icon (^) filename shall be "><img src=x onerror=alert(1);>.jpeg
- 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!
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
- Log in to Slack.
- Create a private group with any name and purpose.
- Open the group's files page.
- Upload a file whose name contains an image tag with an event handler.
- 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.