# User-assisted RCE in Slack for macOS (from official site) due to improper quarantine meta-attribute handling for downloaded files

Slack for macOS Direct Download failed to set com.apple.quarantine on downloaded files, so a sent .terminal file executed attacker commands on open without Gatekeeper warnings.

- Payout: hidden
- Severity: high
- Program: Slack
- Found by: metnew
- Disclosed: 2019-09-14
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/470637
- Library page: https://bugbountylibrary.com/r/h1%3A470637
- Tags: area:os domain:desktop impact:rce kind:bounty platform:hackerone sev:high technique:source-review vuln:misconfiguration vuln:rce

**Target:** Slack macOS desktop client file download handling
**Root cause:** Slack's Direct Download build did not apply the com.apple.quarantine extended attribute to downloaded files, so Gatekeeper never inspected or warned about them. A .terminal file (XML plist) therefore launches and runs shell commands on open.
**Steps:**
1. Attacker sends `exploit.terminal` to victim via Slack; preview shows it as plaintext.
2. Victim opens the file via Shift+Click or in Finder.
3. No Gatekeeper/quarantine alert appears because the quarantine attribute is missing.
4. Shell commands embedded in the .terminal plist execute with user-level privileges.
**How found:** Researcher noticed Slack Direct Download files lacked com.apple.quarantine, then tested a .terminal file which launched without native Gatekeeper alerts, unlike AppStore Slack build.
**Exploitation:** Deliver a crafted .terminal plist over Slack Direct Download; on victim open (one click), Terminal executes the embedded commands with user privileges, bypassing Gatekeeper even under 'AppStore only' settings.
**Escalation:** Gatekeeper bypass allows arbitrary unsigned apps to run in hardened 'AppStore only' environments.
**Insight:** Check whether a downloader sets com.apple.quarantine; any app that strips it turns innocuous-looking file types (.terminal, .command, .workflow) into one-click code execution, and comparing AppStore vs Direct Download builds reveals the gap.

