popup / window.open spam
Open new windows. Same-origin popups can host arbitrary phishing UI.
Behavior by sandbox policy
| Policy | Expected result |
|---|---|
| No sandbox | works |
sandbox="allow-scripts" | blocked |
sandbox="" (strictest) | blocked |
Embed snippet
This snippet uses the dedicated embed page. Paste it into your own service and check rendering or blocking behavior.
<iframe src="https://xss-playground.com/embed/popup-spam?lang=en" title="XSS Playground - popup / window.open spam" width="600" height="420" loading="lazy" referrerpolicy="strict-origin-when-cross-origin"></iframe>
실행
// 로그 없음
해설
- 브라우저는 사용자 제스처 없는 window.open 을 막아 주지만, 사용자가 iframe 영역을 한 번이라도 클릭한 직후라면 보통 통과합니다.
sandbox에allow-popups키워드가 없으면 차단됩니다. 임의 호스트 iframe 을 허용한다면 이 키워드는 빼는 게 맞습니다.- 새 창이 부모와 같은 origin 이면 opener 를 통한 tabnabbing 도 가능합니다. cross-origin 부모는 직접 영향이 적지만,
opener.location변경은 cross-origin 이어도 허용되는 점을 기억하세요.