Skip to content
Info disclosure Disclosed report Beginner

Cross-origin page stays focused before/after downloading + uninformative modal window for download

A cross-origin page opened via window.open can be navigated to a download URL, causing a download modal to appear over the original page. The modal does not show the download's origin or URL, so a user cannot tell which site initiated the download.

metnew Follow

Originally disclosed on HackerOne

  • Triaged in 27 hours
  • Fixed in 53 days
  • Paid in 53 days
  • Disclosed after 3 months

Summary:

  1. Open twitter.com using window.open
  2. Wait some time (to finish page rendering)
  3. Change location of the opened page to any downloading
  4. Download modal appears above the twitter.com

The problem is that a user doesn't see what page exactly initiates downloading and what resource(URL) will be downloaded. It's possible to find out the origin of the downloaded file only after clicking "Save".

FF has a similar modal window for downloads; However, FF shows URL of the resource before downloading. Brave doesn't do that.

Safari+Chrome allow downloads without confirmation, so this behavior is normal for them.

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 Tor: 0.3.3.7 (git-035a35178c92da94) Brave Sync: v1.4.2 libchromiumcontent: 67.0.3396.87

Steps To Reproduce:

Minimal PoC:

HTML
<script>
  function f() {
    w = window.open(`https://twitter.com`);
    setTimeout(() => {
      w.location.replace('./hello.jar')
    }, 3000)
  }
</script>

<h1>
  <a href="#" onclick="f()">Twitter</a>
</h1>

Supporting Material/References:

Live PoC.

PoC + screencast attached.

Impact

This bug is related to UX and low severe. However, it makes #374106 much more available, because it allows downloading a malicious .jar from a "trusted resource".

Note that both #374106 and this report are related to downloads.

Attachments

brave-download-twitter.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 download confirmation modal does not display the source origin or URL of the file being downloaded.

Impact

A user may download a malicious file believing it comes from a trusted site, because the modal does not reveal the true origin; the report rates this as low severity and notes it makes another download-related issue more exploitable.

What the attacker needed

Victim clicks a link; browser is Brave

How it was found

  1. Open a page that runs the proof-of-concept script.
  2. Click the link to open twitter.com in a new window.
  3. Wait for the page to finish rendering.
  4. The script changes the new window's location to a download URL.
  5. A download modal appears over the twitter.com page.

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 click a link that opens another website in a new window, that new window can be made to start a file download. The browser shows a pop-up asking if you want to save the file, but it doesn't say which website the file came from. This makes it easier for a malicious site to trick you into downloading something harmful.

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.