Skip to content
Open redirect Disclosed report Intermediate

Onion-Location header allows to open arbitrary URLs including chrome:

nishimunea Follow

Originally disclosed on HackerOne

  • Disclosed after 2.4 years

Summary:

This PR introduced "Open in Tor" feature that can open .onion URLs offered through Onion-Location response header, but Onion-Location header allows to open arbitrary URLs such as javascript: and chrome:. This behavior can be exploited as a way to bypass SOP and gain access to privileged URLs.

Products affected:

  • Brave Nightly for OSX (1.21.28 Chromium: 88.0.4324.96 (Official Build) nightly (x86_64))

Steps To Reproduce:

  • Open https://csrf.jp/brave/onion.php
  • Click "Open in Tor" button shown in the Brave's address bar
  • Privileged URL chrome://restart/ is opened, and Brave is restarted.

If a user enabled "Automatically redirect .onion sites" in the settings, chrome://restart/ is opened automatically and Brave continues to restart endlessly.

Supporting Material/References:

PoC code in PHP is below

<?php
header("Onion-Location: chrome://restart/");
?>

Impact

As written in the summary, attacker can bypass SOP restrictions and gain access to privileged URLs.

The original report as published on HackerOne, by nishimunea. 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.

What is known

A high-severity open redirect bug in https://github.com/brave/brave-core. HackerOne made it public on 22 June 2023.

About Open redirect

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

More by nishimunea

View all

12 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.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.