Tabnabbing via Window.Opener @Mavenlink
A work sample feature allowed users to add a website link that opened in a new tab without isolating the opener, so the linked page could silently redirect the original tab to a phishing site. An attacker could use this to trick users into entering credentials on a fake page.
- Triaged in 19 days
- Fixed in 26 days
- Paid in 26 days
- Disclosed after 26 days
Details: When you open a link in a new tab ( target="_blank" ), the page that opens in a new tab can access the initial tab and change it's location using the window.opener property.
POC: Edit your website in work sample, with the website URL of http://daniel-tomescu.com/hackerone/landpage.php, which has the following code.
<html> <script> window.opener.location.replace('http://daniel-tomescu.com/hackerone/scampage.php'); </script>My cool page with some funny cat pictures.<br> <br>
</html>Create a work sample, and add that website, but make sure to publicize your profile, in order for other users to see, you can then click on the link to the website. This opens in a new tab, and the existing tab is silently redirected to the a website without asking the user. In a real life example, this would redirect to a phishing site to try gain credentials for users.
The javascript code that does all the magic: window.opener.location.replace(newURL);
Ways to solve this:
Don't open links in new tabs using the target="_blank" Add attribute rel="noreferrer" which also disables referrer Set the window.opener attribute to null on the new tab before redirecting, like this: <script>var w=window.open(url, "target=_blank");w.opener=null;</script> I hope you see why this is dangerous: this method has huge potential for tricking users that click on external links from this site to be a victim of a scam page because the redirecting is made in the background, while the user is focused on another tab.
More then that, some browsers like Mozilla for Android don't even display the URL, just the page title, so the user has no way of knowing that he was redirected to a scam page.
Note that the target page doesn't have to be in the same-origin policy, so can be an entirely different domain, and the redirect happens silently while user is viewing another page.
Hope that all helps, let me know if you need more information. I can provide screenshots and/or screencasts if necessary.
Wonder if this is eligible for a bounty? :) Hope you'll triaged this.
Kind Regards, Jolan Saluria
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 application opened user-supplied links with target="_blank" without setting rel="noopener" or otherwise nulling window.opener, letting the new page navigate the original tab.
Impact
An attacker could silently redirect a victim's original tab to a phishing page to try to steal credentials; some mobile browsers hide the URL, making detection harder.
What the attacker needed
Attacker can add a website link to a work sample; victim clicks the link; profile is public
The fix
Links opened in a new tab should include rel="noopener" (or noreferrer) or set window.opener to null so the new page cannot navigate the original tab.
How it was found
- Edit your website in work sample with a URL hosting a page that uses window.opener to redirect.
- Create a work sample and add that website, making the profile public.
- Click the link to the website; it opens in a new tab and the original tab is silently redirected.
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 link opens in a new tab, the new page can sometimes control the tab it came from. Here, a user-supplied website could change the original page to a fake login screen without the user noticing. This is called tabnabbing and is used 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.