Skip to content
Misconfiguration Disclosed report Intermediate

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

Files downloaded through the Brave browser on macOS were not given the quarantine attribute, so the operating system's usual checks on downloaded executables did not apply. Because Brave could also run files in Terminal, a user could launch a downloaded Java archive with a double click and no warning.

metnew Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 7 days
  • Paid in 7 days
  • Disclosed after 14 months

Summary:

Executable files downloaded through Brave don't have quarantine attribute. That means it's possible to launch any executable bypassing codesigning + quarantine.

However, later I found that Brave has already tracked similar report but only in the context of .pkg files.

Additionally, Brave is allowed to run apps in Terminal. It was already shown in 369185 that Brave has more permissions on Terminal than it should have => It is possible to execute downloaded files in Terminal by click(double click) in Brave "Downloads" toolbar.

macOS doesn't have executable files that could be launched without installation after downloading from the web. Files like .command and .tool could be executed in Terminal and only if they have -x, but these files downloaded from the web have only -rw.

However, it's possible to download and launch Java archives, because they're archives => executable after downloading.

As far as I know, Java isn't installed by default. That means only macOS users with Java installed are affected by this problem.

Products affected:

Brave: 0.23.19 V8: 6.7.288.46 rev: 178c3fbc045a0cbdbe098db08307503cce952081 Muon: 7.1.3 OS Release: 17.6.0 Update Channel: Release OS Architecture: x64 OS Platform: macOS Node.js: 7.9.0 Tor: 0.3.3.7 (git-035a35178c92da94) Brave Sync: v1.4.2 libchromiumcontent: 67.0.3396.87

Steps To Reproduce:

Chrome/<etc>

Apps from unknown publishers disallowed (screencast):

Download test.jar using Chrome -> launch it from Downloads toolbar -> macOS warns that this executable published by an unknown developer -> manually allow running the app from Settings-> app launches.

Apps from anywhere allowed:

Download test.jar using Chrome -> launch it from Downloads toolbar -> macOS warns that this Java archive was downloaded from the web -> allow -> app launches.

Apps from anywhere + downloaded executables allowed:

Download test.jar using Chrome -> launch it from Downloads toolbar -> macOS warns that Chrome can't run files in Terminal.

Brave (unknown publishers disallowed, screencast)

Download test.jar using Brave -> launch it from Downloads toolbar (double click) -> no warnings, Java archive launches.

Supporting Material/References:

Live PoC + jar + screencast

Impact

Java isn't installed on macOS by default (as I know), that's why it's not critical.

Users with installed Java could run any downloaded through Brave java archive from Downloads toolbar bypassing quarantine + code-signing checks in one click (double click).

I think this isn't a duplicate, because this attack scenario leverages two vulnerabilities (quarantine + Brave permissions over Terminal).

The fact that downloaded files aren't in quarantine by itself doesn't show that it's possible to execute any app by click. However, Brave's permissions over Terminal introduce that.

Attachments

brave-jar.mp4 From the original on HackerOne

The original report as published on HackerOne, by metnew. 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 Brave did not set the macOS quarantine attribute on downloaded files, and it also had permission to run files in Terminal, so the two gaps combined to skip the usual warnings.

Impact

Users who have Java installed could run any downloaded Java archive from the Downloads toolbar in one double click, bypassing quarantine and code-signing checks; users without Java are not affected.

What the attacker needed

MacOS; Brave browser; Java installed; victim double-clicks the file

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 download a file on a Mac, the system normally marks it as 'from the internet' so it can warn you before running it. Brave was not adding that mark, so the warning never appeared. Since Brave could also open files in the Terminal app, a downloaded Java program could start with just a double click.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by metnew

View all

25 more disclosed reports, best first.

More from Brave Software

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.