Bypassing CSP with dangling iframes
Summary: PortSwigger researcher Gareth Heyes found that setting a cross-domain iframe's location to about:blank in Chrome transfers ownership of the frame to the setting domain, making window.name readable and writable and allowing JavaScript execution regardless of the parent page's CSP. He reported the bug to Google on 2022-02-10 and to Mozilla the same day, and published the writeup on 2022-06-14, after Chrome 97 had already broken his earlier dangling markup lab.
Bottom line: The technique sidesteps Chrome's dangling markup mitigations and works even when JavaScript is disabled in the CSP, so a site that treats its policy as watertight may still leak cross-domain information through an injection.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026