Reverse tabnabbing

Opener protection for links that open a new tab

Description

A new tab with access to window.opener can redirect the original tab. Browsers that follow the current HTML standard disconnect the opener by default on target="_blank" links. Check older browsers you support and links that explicitly set rel="opener".

Potential impact

A user returning to the original tab may trust a phishing page there and enter credentials or other sensitive data.

Remediation

  • Set rel="noopener" explicitly on external links opened in a new tab. Add noreferrer if you also want to suppress the Referer header.
  • Apply the settings in your shared external-link component when possible.

Examples

Before

html
<a href="https://example.org" target="_blank">외부 링크</a>

After

html
<a href="https://example.org" target="_blank" rel="noopener noreferrer">외부 링크</a>

The example uses rel="noopener noreferrer" to disconnect the opener and omit the referrer.

References