# Lack of quarantine meta-attribute for downloaded files leads to GateKeeper bypass

Brave on macOS failed to set the quarantine attribute on downloaded files, letting a downloaded .jar launch from the Downloads toolbar without GateKeeper or code-signing warnings.

- Payout: hidden
- Severity: low
- Program: Brave Software
- Found by: metnew
- Disclosed: 2019-09-12
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/374106
- Library page: https://bugbountylibrary.com/r/h1%3A374106
- Tags: area:os domain:desktop impact:rce kind:bounty platform:hackerone sev:low technique:chained vuln:auth-bypass vuln:misconfiguration

**Target:** macOS desktop browser download handling and Downloads toolbar
**Root cause:** Brave did not apply the com.apple.quarantine extended attribute to files it downloaded, so macOS treated them as locally-created and skipped GateKeeper/code-signing checks. Brave also held Terminal automation permissions, letting it execute downloaded archives on double-click.
**Steps:**
1. Download `test.jar` using Brave on macOS.
2. Double-click the file in Brave's Downloads toolbar.
3. Brave executes the archive via Terminal with no quarantine or code-signing warning, and the Java app launches.
**How found:** Noticed downloaded executables lacked the quarantine attribute, then observed Brave could run apps in Terminal, and tested .jar archives since they are executable after download unlike .command/.tool which lack -x.
**Exploitation:** Attacker hosts a malicious .jar; victim downloads it in Brave and double-clicks it in the Downloads toolbar. Because no quarantine xattr is set and Brave can run apps in Terminal, the archive executes without GateKeeper or notarization prompts. Requires Java installed on the victim's macOS.
**Escalation:** Chains the missing quarantine attribute with Brave's excessive Terminal permissions (prior report 369185) to achieve one-click execution of downloaded code.
**Insight:** On macOS, check whether a browser sets com.apple.quarantine on downloads (xattr -l) and whether the browser holds Automation/Terminal entitlements; archives like .jar execute post-download without the -x bit that blocks .command/.tool.

