Stored XSS through PDF viewer
A vulnerable dependency in Slack's PDF viewer failed to properly encode special characters in shared PDF files, allowing an attacker to upload a malicious PDF that could execute JavaScript in the viewer. This could have exposed user data.
- Triaged in 17 days
- Fixed in 2 months
- Paid in 23 days
- Disclosed after 22 months
Summary by the program
Slack allows users to upload files to their Workspace to facilitate sharing information between team members as well as with other workspaces. In addition, with the aim of easing access to PDF files, Slack provides its own "PDF Viewer" (https://app.slack.com/pdf-viewer) embedded in the application which renders the PDF contents without requiring the user to download the file to their local computer. Typically, files shared in this way containing special characters will be HTML encoded, so that their contents will not be rendered as HTML or executed as JavaScript code in the browser. Due to a dependency vulnerable to Cross-Site Scripting, if an attacker shared a malicious PDF file via the Upload file option, the Slack "PDF viewer" could have exposed user data. The issue was resolved by patching a vulnerable dependency in the PDF viewer. Slack undertook a thorough analysis and concluded that no customer was impacted by this vulnerability.
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 a third-party dependency used by the PDF viewer failed to HTML-encode special characters in PDF content, allowing script execution.
Impact
An attacker could have exposed user data by sharing a malicious PDF, though Slack concluded no customer was impacted.
What the attacker needed
Ability to upload a file to a Slack workspace
The fix
The issue was fixed by patching the vulnerable dependency in the PDF viewer.
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 you share a PDF in Slack, Slack shows it in a built-in viewer instead of making you download it. Normally Slack cleans up any special characters in the file so they cannot run code in your browser. Here, a piece of software Slack relied on did not clean things up properly, so a crafted PDF could run code and potentially read your data.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.