Skip to content
XSS Disclosed report Intermediate

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.

hitman_47 Follow

Originally disclosed on HackerOne

Bounty$4,875 High 8.8 View original
  • 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.

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

More by hitman_47

View all

5 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.