Skip to content
Disclosed report Beginner

Tab nabbing via window.opener

Links opened in a new tab did not set window.opener to null, so the newly opened page could reach back into the original tab and change its address. An attacker could use this to swap the original tab for a fake login page and phish the user's credentials.

logan47 Follow

Originally disclosed on HackerOne

  • Fixed in under an hour
  • Disclosed after 2 hours

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.

Attack scenario: here i have provided 2 videos, in video 1 i have my editorial link set. to show that tabnapping is possible.which you can see in the video 1 . in video 1 i have given my editorial in such a way that it will redirect me tothe malicious page which will redirect the original site to attackers site.[i am using localhost.]

In video 2nd i have shown that if a user is new and has not given his editorial link or he has not given the editorial link anyway, then in this case when he see any translation and click on the source link then he will be redirected to the attacker given link which inturn can be malicious . if it is then it will redirect the original tab to attacker site which can be used for phishing and also account takeove. such as attacker makes a copy of your login page and when user redirects to his site he can easily display in his fake page that you session has been timedout please login again .

I hope you have understanded what i am trying to say.

Impact

because the redirecting is made in the background, while the user is focused on another tab. this Can be very dangerous if attacker is smart than he can trick the victim easily and can takeover his account easily through scam page and can also lead to several phishing attacks.

Websites that protect themselves against this kind of attack: google.com websites, twitter.com (they open links in new tabs, but the window.opener property is set to null)

Hope that all helps, let me know if you need more information

For more check: https://hackerone.com/reports/23386 https://hackerone.com/reports/179568

Attachments

weblate.mp4 From the original on HackerOne
weblate2.mp4

The original report as published on HackerOne, by logan47. 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 site opened links in new tabs without setting rel="noopener" (or window.opener = null), leaving the opener reference available to the linked page.

Impact

Because the redirect happens in the background while the user is focused on another tab, an attacker could phish credentials and potentially take over the account.

What the attacker needed

Victim clicks a link that opens a new tab; attacker controls the linked page

The fix

Sites can set window.opener to null so the new page cannot reach the original tab.

How it was found

  1. A user opens a translation and clicks the source link, which opens in a new tab.
  2. The linked page keeps a reference to the original tab through window.opener.
  3. That page changes the original tab's location to an attacker-controlled site.
  4. The attacker site shows a fake login page claiming the session timed out.

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 site opens a link in a new tab, the new page can sometimes control the tab it came from. If that new page is malicious, it can quietly send the old tab to a fake login page while the user is looking elsewhere. The user then types their password into the attacker's copy of the site.

More from Weblate

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.