Cyber Risks · PortSwigger Research

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