Skip to content
DoS Disclosed report Beginner

Denial of service attack(window object) on brave browser

The Brave browser allows a script to close the current window without user confirmation, unlike other browsers. An attacker could send a malicious HTML file that, when opened and a link clicked, closes the window, causing a denial of service.

sahiltikoo Follow

Originally disclosed on HackerOne

  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 9 days

Summary:

hey there,

The Brave browser is vulnerable to window object based denial of service attack. The brave browser fails to sanitize a check when window.close() function is called in number of dynamically generated events.. The function is called in a suppressed manner and kills the parent window directly by default which makes it vulnerable to denial of service attack.

When an attacker sends an html file to victim :-

<html> <title>Brave Window Object Remote Denial of Service.</title> <head></head> <body><br><br> <h1><center>Brave Window Object Remote Denial of Service</center></h1><br><br> <h2><center>Proof of Concept</center></br></br> </h2> <center> <b>Click the below link to Trigger the Vulnerability..</b><br><br> <hr></hr> <hr></hr> <b><center><a href="javascript:window.close(self);">Brave Window Object DoS Test POC</a></center> </center> </body> </html>

Here window.close() method should be sanitized and should not close the current window.I tested it in Firefox and chrome(Linux platform) and this widow object is validated there and current window doesn't close.

This security issue is a result of design flaw in the browser.Scripts must not close windows that were not opened by script,if script specific code is designed. There must be a parent window confirmation check prior to close of window.

Products affected:

Latest Brave browser in Linux(Kali Linux)

Steps To Reproduce:

1 Open the HTML file in brave browser in your Linux platform 2 click on the link provided 3 You will see the current window i.e. the window in which the HTML file was opened closes.

Supporting Material/References:

I have added a video POC and the html file.

Attachments

The original report as published on HackerOne, by sahiltikoo. 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 does not enforce the rule that scripts may only close windows they opened themselves, allowing any script to close the current window.

Impact

An attacker could cause a denial of service by closing the victim's browser window, but only if the victim opens a malicious HTML file and clicks a link.

What the attacker needed

Victim uses Brave browser on Linux; victim opens a malicious HTML file; victim clicks a link

The fix

The browser should prevent scripts from closing windows not opened by script, requiring user confirmation.

How it was found

  1. Open the HTML file in Brave browser on Linux.
  2. Click the link provided in the page.
  3. The current window closes.

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.

This report says that in the Brave browser, a web page can close its own window without asking the user. Other browsers block this. An attacker could trick someone into opening a file that closes their browser window, a denial of service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by sahiltikoo

View all

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

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.