Tab nabbing via window.opener.location (target "_blank")
Links opened with target="_blank" did not sever the relationship to the opening page, so the newly opened page could rewrite the original tab's address. An attacker could use this to swap the victim's tab to a phishing page.
- Triaged in 2 months
- Fixed in 2 months
- Disclosed after 3 months
Summary:
When you open a link using target="_blank", the page that opens in a new tab get access to the initial tab and change its location using the window.opener.location function.
Platform(s) Affected:
website
Steps To Reproduce for the first target _blank:
- First target "_blank"
- On https://www.tumblr.com/customize add the following script :
<script>
window.opener.location = 'https://davidebove.com/blog/2016/05/05/target_blank-vulnerability-test-page/';
</script>
- Send to test account your link blog.
- On the test account open the link ; the initial page will be changed.
- Watch the POC video if you want more details.
Steps To Reproduce for the second target _blank:
- Second target "_blank"
- On https://www.tumblr.com/customize add the following script :
<script>
window.opener.location = 'https://davidebove.com/blog/2016/05/05/target_blank-vulnerability-test-page/';
</script>
- Send to test account random message.
- On the test account click on the account name and the blog view page will be opened, next click on account blog link.
- Watch the POC video if you want more details.
Steps To Reproduce for the third target _blank:
- Third target "_blank"
- On https://www.tumblr.com/customize add the following script :
<script>
window.opener.location = 'https://davidebove.com/blog/2016/05/05/target_blank-vulnerability-test-page/';
</script>
- Send to test account your link blog.
- On the test account navigate somewhere, click on the name account of sender ; the initial page will be changed.
- Watch the POC video if you want more details.
Supporting Material/References:
- don't forget to close all tabs
- POCs !
- relative report that can maybe help you : https://hackerone.com/reports/179568
Impact
It can allow an attacker to open a malicious site on the victim account. Perform phishing attacks.
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 links using target="_blank" without rel="noopener" (or equivalent) leave window.opener available to the opened page.
Impact
An attacker could redirect the victim's original tab to a malicious site, which may be used for phishing.
What the attacker needed
Attacker can post a link or script; victim clicks the crafted link
How it was found
- Add a script to the blog customisation page that sets the opener's location.
- Send the crafted blog link to a test account.
- Open the link on the test account and observe the original page change.
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.
An attacker uses this to replace the page you were reading with a malicious site, for example for phishing.
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.