Skip to content
RCE Disclosed report Advanced

`chrome://brave` available for navigation in Release build [-> RCE] + navigation to `chrome://*` using tab_helper ["Open in new tab"]

Brave browser allowed navigation to the internal chrome://brave origin from a local HTML file, which then loaded with access to private Muon APIs. An attacker could use these APIs to execute arbitrary code on the device, such as launching Calculator.app.

metnew Follow

Originally disclosed on HackerOne

  • Triaged in 17 hours
  • Fixed in 20 days
  • Paid in 20 days
  • Disclosed after 40 days

Summary:

chrome://brave is available for navigation

Navigation to chrome://brave + <local_file_path> requires local file at <local_file_path>.

The file loaded in this context has access to private Muon APIs such as chrome.ipcRenderer/remote/webFrame/webViewRequest.

Muon API allows executing code on the device. (e.g. with chrome.remote.require('child_process').exec)

In addition, Brave isn't sandboxed (on all OS).

That's clearly a vulnerability, not a feature:

  1. it's in Release channel, not in Debug builds
  2. Could lead to RCE

Note: attacker knows the correct <local_file_path> after loading the file from file:// origin (window.location.pathname).

Navigation to chrome://brave

I've already shown the way to navigate to file:// URLs in #369218, which was fixed in 0.23.80.

I mentioned in the report that it's possible navigating to chrome:// URLs too in #369218. However, the fix was incomplete. It only works for about: and file:URLs.

PoC

  1. Shows that <webview> works
  2. Launches Calculator.app on macOS

Products affected:

Brave: 0.23.79 (0.23.80 and 0.23.100 too, where #369218 is patched) V8: 6.8.275.24 rev: 51b49051a779f0db94fbcfd0df5faca781299ea0 Muon: 8.0.7 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.84

Steps To Reproduce || Attack Scenario:

  1. Download exploit.html
  2. Open link in the file using "Open in new tab"
  3. The new tab opens with private <webview> tag + Calculator.app starts

Patch

Preventing navigation to chrome://brave origin seems ok.

Additional resources

Screencast attached.

Impact

Crafted HTML file allows executing code on the device.

Requires user gesture - "Open in a new tab". Set impact to "High", because requires downloading the file.

Attachments

brave-chrome-brave-new-tab.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 fix for a previous navigation issue only blocked about: and file: URLs, leaving chrome:// URLs reachable, and the chrome://brave page then exposed privileged APIs to the loaded content.

Impact

Crafted HTML file allows executing code on the device, but requires a user gesture ('Open in a new tab') and downloading the file.

What the attacker needed

Victim downloads a malicious HTML file; victim chooses 'Open in new tab'

The fix

Preventing navigation to the chrome://brave origin was suggested as a fix.

How it was found

  1. Download the exploit HTML file.
  2. Open the link in the file using 'Open in new tab'.
  3. The new tab opens with a private webview tag and Calculator.app starts.

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 browser has special internal pages (like chrome://brave) that normal websites should not be able to open. This report shows that a malicious local file could trick the browser into opening that internal page, and from there run programs on the computer. The attacker needs the victim to download a file and choose 'Open in new tab'.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

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.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.