Loading...
Loading...
Links that open in a new tab (`target="_blank"`) without `rel="noopener"` or `rel="noreferrer"` are vulnerable.
Reverse Tabnabbing: The newly opened page gets access to the `window.opener` object of your page. A malicious external site can use `window.opener.location = "fake-login.com"` to redirect YOUR user to a phishing page in the detailed background tab. The user finishes reading, closes the tab, sees the "login" screen on your tab, and gets phished.
Modern browsers (Chrome 88+) implicitly treat `target="_blank"` as `rel="noopener"`, but relying on browser defaults is risky. Always explicitly add `rel="noopener"` to external links. Frameworks like Next.js `next/link` handle this automatically, but raw `<a>` tags do not.
Find every `target="_blank"` anchor missing `rel="noopener"`. Grep over source, or use an ESLint rule that flags this at build time. Scanners can also crawl the rendered DOM and report offenders.
grep -nrE "target=[\"\x27]_blank[\"\x27]" ./src | grep -v "rel=" | head -50npm install -D eslint-plugin-react && // .eslintrc: "react/jsx-no-target-blank": "error"`noopener` is the security fix (blocks `window.opener` access). `noreferrer` additionally strips the Referer header. For security, `noopener` alone is enough; for privacy, add `noreferrer`. Most teams set both.
Yes, for defense in depth. Chrome's default is good for consumer browsers but there are still surfaces - Electron apps, older mobile WebViews, and embedded browsers - where the old behaviour applies. Explicit `rel` is three characters and removes the question entirely.
Next.js `<Link>`, React Router `<Link>`, and most component libraries inject `rel="noopener noreferrer"` automatically. Raw `<a target="_blank">` tags, `dangerouslySetInnerHTML` output, and CMS-rendered markdown still need the audit.
Applied the configuration change? Run a live scan to confirm the vulnerability is patched.