Navigation to protocol handler URL from the opened page displayed as a request from this page.
A page opened via window.open could have its location changed to a protocol handler URL, and the resulting prompt was displayed as if it came from the opened page's origin. An attacker could therefore trick a user into launching a protocol handler while believing the request came from a trusted site.
- Triaged in 2 days
- Fixed in 53 days
- Paid in 5 days
- Disclosed after 3 months
Summary:
Navigation to protocol handler URL from the page opened using window.open is considered as a request from the opened page.
Example:
- The page opens
google.com - The page changes opened window's location to
ssh://evil.com - Request to open
ssh://evil.comURL displayed atgoogle.com
Combining this vulnerability with #369185 makes the attack scenario in #369218 more available.
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:
PoC:
<script>
window.onclick = () => {
w = window.open("https://google.com")
setTimeout(() => {
t = w.location.replace('ssh://evil.com');
}, 1000)
}
</script>
Supporting Material/References:
Screencast + PoC attached.
Impact
An attacker could trick a user to open protocol handler from a trusted site.
Combining this with #369185 makes the attack scenario in #369218 more available.
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 attributed the protocol handler navigation to the opened page's origin rather than to the page that initiated the navigation.
Impact
An attacker could trick a user into opening a protocol handler from a trusted site, and combining this with another issue makes a related attack scenario more available.
What the attacker needed
Victim clicks on the attacker's page; browser supports protocol handler prompts
How it was found
- Open a page that runs the proof-of-concept script.
- Click on the page to trigger the script, which opens a new window to a trusted site.
- After a short delay, the script changes the opened window's location to a protocol handler URL.
- Observe that the request to open the protocol handler is displayed as coming from the trusted site.
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 a website opens another page in a new window, the browser normally keeps track of which site that window belongs to. This report shows that if the first page then changes the new window's address to a special link like ssh://, the browser still shows the prompt as coming from the trusted site. That means a user could be tricked into opening an app or protocol while thinking a trusted site asked for it.
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.