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.
- Triaged in 27 hours
- Fixed in 53 days
- Paid in 53 days
- Disclosed after 3 months
Summary:
- Open
twitter.comusingwindow.open - Wait some time (to finish page rendering)
- Change location of the opened page to any downloading
- 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:
<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:
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
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
- Open a page that runs the proof-of-concept script.
- Click the link to open twitter.com in a new window.
- Wait for the page to finish rendering.
- The script changes the new window's location to a download URL.
- 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.