RESOLVED FIXED302102
[Site Isolation] Incorrect origin for about:blank iframes
https://bugs.webkit.org/show_bug.cgi?id=302102
Summary [Site Isolation] Incorrect origin for about:blank iframes
Anthony Tarbinian
Reported 2025-11-06 11:28:31 PST
Summary: With site isolation turned on, when a cross origin iframe navigates back to about:blank it keeps its cross origin status. Steps To Reproduce: 1. Open a page to `about:blank` 2. Open the WebInspector 3. Run the following JS commands in the console: ``` let i = document.createElement('iframe'); document.body.appendChild(i); i.src="https://example.com" i.src="about:blank" i.contentWindow.document.body.appendChild(i.contentWindow.document.createTextNode('some text')) ``` Results: Observe how attempting to modify the DOM of the about:blank is blocked with a SecurityError: “SecurityError: Blocked a frame with origin "null" from accessing a cross-origin frame. Protocols, domains, and ports must match..” According to the HTML spec (https://html.spec.whatwg.org/multipage/browsing-the-web.html#beginning-navigation): > If url matches about:blank or is about:srcdoc, then: > > Set documentState's origin to initiatorOriginSnapshot. > > Set documentState's about base URL to initiatorBaseURLSnapshot. Regression: Problem reproducibly occurs on WebKit with site isolation enabled. With site isolation off, the DOM of the about:blank iframe is able to be modified by the main frame.
Attachments
Anthony Tarbinian
Comment 1 2025-11-06 11:34:23 PST
Anthony Tarbinian
Comment 2 2025-11-06 11:34:50 PST
EWS
Comment 3 2025-11-19 18:11:44 PST
Committed 303299@main (84738405475e): <https://commits.webkit.org/303299@main> Reviewed commits have been landed. Closing PR #52845 and removing active labels.
Anthony Tarbinian
Comment 4 2025-12-04 12:11:00 PST
Broke scrolling with site isolation (see https://bugs.webkit.org/show_bug.cgi?id=303451). Original commit was reverted, so re-opening this issue.
Anthony Tarbinian
Comment 5 2025-12-04 12:23:54 PST
Note You need to log in before you can comment on or make changes to this bug.