Download attribute allows downloading local files
Brave browser allowed a web page to download local files via a link with the download attribute pointing to a file:// URL, unlike other browsers. An attacker could use this to trick a user into downloading and opening local files, aiding phishing.
- Triaged in 13 days
- Fixed in 7 months
- Paid in 13 days
- Disclosed after 8 months
Summary:
The attribute download in a a tag allows for download the href target to file and saving it locally.
In mozilla and chrome, it is forbidden to download local file via file:// .., in Brave however this is not enforced and it is not clear to the user if they are downloading something remote or local. This could be abused to social engineering and phishing that is hard to spot without reviewing the js code.
Products affected:
Name Version
Brave 0.18.16
rev 8003c66
Muon 4.3.6
libchromiumcontent 60.0.3112.78
V8 6.0.286.44
Node.js 7.9.0
Update Channel dev
OS Platform Linux
OS Release 4.4.0-64-generic
OS Architecture x64
Steps To Reproduce:
Create a <a href="files:///etc///passwd" download>Download local file</a>
On a linux machine, click the link, download the file, open it. It's the local file.
Expected result file:// not allowd
Result file downloaded
Please see the poc below and screenshots
Supporting Material/References:
I added a POC with a phishing page that attempts to gets users passwd file.
http://159.203.190.123/braaaaaaaaaave/3t98j2398jegjsguieiu3tuihsgdiu___brave_0010-localfile.html with the purpose to phish passwd files and added pictures of each frame of the attack.
Attachments




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
Impact
An attacker could craft a phishing page that tricks users into downloading local files, which could then be used for social engineering; the report does not claim direct code execution.
What the attacker needed
Victim uses Brave browser; victim clicks a link
How it was found
- Create an anchor tag with href pointing to a local file and the download attribute.
- On a Linux machine, click the link.
- The file is downloaded.
- Open the downloaded file; it is the local 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.
A web page can include a link that, when clicked, downloads a file to your computer. Normally, browsers block links that point to files already on your computer (like system files) for safety. In Brave, this block was missing, so a malicious page could make you download your own system files, which could then be used to trick you.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.