Onion-Location header allows to open arbitrary URLs including chrome:
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.
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.