postMessage spoofingEMBEDDED

Send forged messages to the parent via parent.postMessage. If the parent skips event.origin validation, it can trust attacker-crafted payloads.

Behavior by sandbox policy
PolicyExpected result
No sandboxworks
sandbox="allow-scripts"works
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/post-message?lang=en" title="XSS Playground - postMessage spoofing" width="600" height="420" loading="lazy" referrerpolicy="strict-origin-when-cross-origin"></iframe>

실행

target origin
// 로그 없음

해설