Skip to content
Open redirect Disclosed report Beginner

Missing rel=noopener noreferrer in target=_blank links (Phishing attack)

Links with target=_blank lacked rel=noopener noreferrer, allowing the opened page to change the opener's location via window.opener. An attacker could redirect the original page to a phishing site.

e3amn2l Follow

Originally disclosed on HackerOne

  • Fixed in 3 days
  • Paid in 6 months
  • Disclosed after 3 days

Links that use target=_blank need to have rel="noopener noreferrer" in order to mitigate phishing attack (opened page can change the location of page that opened him via window.opener.location = 'http://phishingsite.com/' )

more information about this vulnerability: https://blog.whatever.io/2015/03/07/on-the-security-implications-of-window-opener-location-replace/ https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/

steps to reproduce:

1. click on any of the links below from airship. 2. run the following javascript code in new opened page:

window.opener.location = 'http://phishingsite.com/'

The above will work even if the target domain is changed (not github.com anymore) via clicking on link from target domain.

usage of _blank in airship:

1. https://github.com/paragonie/airship/blob/master/src/Installer/skins/admin_account.twig#L17

            get a password manager such as <a target="_blank" href="https://github.com/keepassx/keepassx/">KeePassX</a>.

2. https://github.com/paragonie/airship/blob/58f96aa0e5002b60e74456502d9bfc9483d77b3d/src/Cabin/Bridge/public/passwords.js#L26

        html = 'Good password, as long as it\'s unique!<br />If you\'re not already, consider using a password manager such as <a target="_blank" href="https://github.com/keepassx/keepassx/">KeePassX</a>.';

3.\ https://github.com/paragonie/airship/blob/58f96aa0e5002b60e74456502d9bfc9483d77b3d/src/Installer/skins/js/admin_account.js.twig#L26

        html = 'Good password, as long as it\'s unique!<br />If you\'re not already, consider using a password manager such as <a target="_blank" href="https://github.com/keepassx/keepassx/">KeePassX</a>.';

4. https://github.com/paragonie/airship/blob/master/src/public/js/wysihtml5/parser_rules/simple.js#L23-L26

      set_attributes: {
        target: "_blank",
        rel:    "nofollow"
      },

fix:

  1. always add rel="noopener noreferrer" for links that have target=_blank, unless the opened window need to change the location using window.opener.location

The original report as published on HackerOne, by e3amn2l. 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 links were created without the rel=noopener noreferrer attribute, leaving window.opener accessible.

Impact

An attacker could redirect the original page to a phishing site.

What the attacker needed

Victim clicks a link with target=_blank; attacker controls the opened page

The fix

Always add rel="noopener noreferrer" for links that have target=_blank, unless the opened window needs to change the location using window.opener.location.

How it was found

  1. Click on any of the links below from airship.
  2. Run the following javascript code in new opened page: window.opener.location = 'http://phishingsite.com/'

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 original page using a browser feature called window.opener. If the new page is malicious, it can redirect the original page to a fake login site. Adding rel=noopener noreferrer stops this.

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 by e3amn2l

View all

8 more disclosed reports, best first.

More from Paragon Initiative Enterprises

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.