Skip to content
Open redirect Disclosed report Beginner

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.

subnetix Follow

Originally disclosed on HackerOne

  • 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:

  1. First target "_blank"
  2. On https://www.tumblr.com/customize add the following script :
JavaScript
<script>
window.opener.location = 'https://davidebove.com/blog/2016/05/05/target_blank-vulnerability-test-page/';
</script>
  1. Send to test account your link blog.
  2. On the test account open the link ; the initial page will be changed.
  3. Watch the POC video if you want more details.

Steps To Reproduce for the second target _blank:

  1. Second target "_blank"
  2. On https://www.tumblr.com/customize add the following script :
JavaScript
<script>
window.opener.location = 'https://davidebove.com/blog/2016/05/05/target_blank-vulnerability-test-page/';
</script>
  1. Send to test account random message.
  2. On the test account click on the account name and the blog view page will be opened, next click on account blog link.
  3. Watch the POC video if you want more details.

Steps To Reproduce for the third target _blank:

  1. Third target "_blank"
  2. On https://www.tumblr.com/customize add the following script :
JavaScript
<script>
window.opener.location = 'https://davidebove.com/blog/2016/05/05/target_blank-vulnerability-test-page/';
</script>
  1. Send to test account your link blog.
  2. On the test account navigate somewhere, click on the name account of sender ; the initial page will be changed.
  3. Watch the POC video if you want more details.

Supporting Material/References:

Impact

It can allow an attacker to open a malicious site on the victim account. Perform phishing attacks.

Attachments

report-1.mp4 From the original on HackerOne
report-2.mp4
report-3.mp4

The original report as published on HackerOne, by subnetix. 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 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

  1. Add a script to the blog customisation page that sets the opener's location.
  2. Send the crafted blog link to a test account.
  3. 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.

More from Automattic

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.