[XSS] Breaking ‘safe’ embeds via frame-src bypass
Overview We pat ourselves on the back when our WAF blocks a classic <script> alert. But modern web applications are a tapestry of first-party code and third-party services. What happens when an attacker doesn't need to break your walls, but simply uses a door you left open for a trusted guest? The Vulnerability Let's set the scene. Your application, trusted-site.com, has secure server-side filters. It correctly neutralizes or blocks any user input containing <script>, onerror=, or other obvious XSS vectors. However, to support rich content, you allow certain HTML tags like <iframe> and <object>. These are necessary for embedding videos, maps, or other third-party widgets. An attacker discovers this policy. They don't try to inject JavaScript directly. Instead, they inject a gateway: <iframe src="https://vulnerable-widget-provider.com/page-with-xss.html" style="position:fixed;top:0;left:0;width:100vw;height:100vh;border:none;"...