pentesting, updated
Testing for reverse tabnabbing
Check whether a link opened in a new tab can use window.opener to redirect the original tab to a phishing page.
Goal
Confirm every target="_blank" link (especially to user-controlled or third-party URLs) sets rel="noopener".
How to test
Check the page source for the pattern:
curl -s https://example.com | grep -oE '<a[^>]*target="_blank"[^>]*>'
A link missing rel="noopener" (or noreferrer) lets the opened page run window.opener.location = 'https://evil.com', silently redirecting the original tab behind it.
What to look for
A target="_blank" link without rel="noopener", especially one pointing at a URL partly under user control (a shared link, an external profile link).
References
- OWASP WSTG-CLNT-13 — Testing for Reverse Tabnabbing.