Tabnapping

From zakirkun/ice-tea · View interactive version

Tabnapping is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects anchor tags with target="_blank" without rel="noopener noreferrer", allowing opened pages to manipulate the opener.

How to use this skill

Skill file

Reverse Tabnapping

Overview

When an <a> tag uses target="_blank" without rel="noopener noreferrer", the opened page gets a reference to the opener window via window.opener. A malicious opened page can redirect the original tab to a phishing page (window.opener.location = 'https://phishing.com').

Remediation

Always add rel="noopener noreferrer" to links with target="_blank":

Vulnerable:

<a href="https://external.com" target="_blank">Visit</a>

Safe:

<a href="https://external.com" target="_blank" rel="noopener noreferrer">Visit</a>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.