Skip to content
Open redirect Disclosed report Intermediate

URL spoofing using protocol handlers

Brave browser did not clear the address bar after navigating to a protocol handler URL, allowing an attacker to spoof the displayed URL. An attacker could open a page with a fake URL and inject content to run JavaScript, tricking users.

metnew Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 2 months
  • Paid in 56 days
  • Disclosed after 3 months

Summary:

Navigation to protocol handler changes URL in the address bar (e.g. ssh://google.com in the address bar is standard behavior).

Browsers change URL in the address bar to about:blank if a parent window tries to access the opened page with protocol handler URL. This behavior prevents URL spoofing.

However, Brave doesn't clear address bar after navigation to protocol handler URL -> URL spoofing.

Products affected:

Brave: 0.23.19 V8: 6.7.288.46 rev: 178c3fbc045a0cbdbe098db08307503cce952081 Muon: 7.1.3 OS Release: 17.6.0 Update Channel: Release OS Architecture: x64 OS Platform: macOS Node.js: 7.9.0 Brave Sync: v1.4.2 libchromiumcontent: 67.0.3396.87

Steps To Reproduce:

Minimal PoC:

"http." instead of "http" looks good

<body>
    <script>
        window.onclick = () => {
            x = window.open('http.://google.com')
            setTimeout(() => {
                x.document.write(`Hello Google.com! <button onclick="alert('I can run JS on this page!')">Click me!</button>`)
            }, 1000)
        }
    </script>
</body>

Supporting Material/References:

Live PoC Screencast

Impact

URL spoofing 😈

Attachments

brave-url-spoofing-notreal-protocol.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 browser failed to reset the address bar to 'about:blank' after a protocol handler navigation, unlike other browsers.

Impact

An attacker could spoof the URL in the address bar and run JavaScript on the page, potentially tricking users.

What the attacker needed

Victim uses Brave browser; victim clicks on a link or page

How it was found

  1. Click on the page to trigger the script.
  2. The script opens a new window with a protocol handler URL.
  3. After a delay, the script writes content into the new window.

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.

When you visit a link that uses a special protocol like 'ssh://', the browser usually changes the address bar to 'about:blank' to prevent showing a fake website address. Brave did not do this, so an attacker could make the address bar show a trusted site while actually showing attacker-controlled content.

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

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.