Skip to content
XSS Disclosed report Intermediate

CSS Injection to disable app & potential message exfil

A custom theme setting in the Slack desktop app accepted CSS that was not properly confined, so a crafted colour value could inject a rule that hides the whole interface. An attacker who shared such a theme could leave a victim unable to use the app, and the effect survived a reinstall.

Matt Langlois Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in 18 days
  • Fixed in 48 days
  • Paid in 48 days
  • Disclosed after 3 months

Tested on Slack for MacOS v4.0.2 - I've marked this as code injection since there was no "css injection"

  1. In the app go to Preferences -> Sidebar
  2. Enable custom theming
  3. Set the column BG to #FFFFFF;} html {display:none;}
  4. The app will no-longer render (this survives re-installs)

If this theme were to be shared to someone unsuspecting they would be unable to use slack, even surviving a reinstall (on mac, untested on other platforms).

Furthermore it might be possible to exfil message data using CSS only. As seen here it is possible to keylog via CSS only https://github.com/maxchehab/CSS-Keylogging/ however I have not been able to come up with a proper PoC of this.

I've marked this as low for now as I don't have a PoC exiling data however I have shown that it is possible to inject to completely disable the app.

Impact

The app is no longer able to render - there might be the possibility of data exfil but I didn't get a PoC working.

The original report as published on HackerOne, by fletchto99. 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 theme colour values were inserted into a stylesheet without validation or escaping, letting a value break out of its declaration and add new CSS rules.

Impact

A shared malicious theme could make the app unusable for an unsuspecting user, and the author suggests message data might possibly be exfiltrated via CSS, though no proof of concept was achieved.

What the attacker needed

Victim imports or applies a shared theme; custom theming enabled

How it was found

  1. Open the app's Preferences and go to the Sidebar section.
  2. Turn on custom theming.
  3. Enter a crafted value in the column background colour field that closes the declaration and adds a rule hiding the page.
  4. The app stops rendering, and this persists after reinstalling.

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.

The app lets you pick colours for its sidebar, and it puts those colours into the page's styling code. The author found that by adding extra styling instructions after a colour, they could tell the app to hide everything on screen. Because the bad theme is saved, the app stays broken even after reinstalling.

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 Matt Langlois

View all

1 more disclosed report, 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.