WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
324904
[Site Isolation] Sandbox attribute changes don't reach a cross-process iframe's own process
https://bugs.webkit.org/show_bug.cgi?id=324904
Summary
[Site Isolation] Sandbox attribute changes don't reach a cross-process iframe...
zak ridouh
Reported
2026-09-22 16:39:26 PDT
When a parent changes the sandbox attribute of a cross-site iframe under Site Isolation, only the UI process learns the new flags. The iframe's own process keeps the old ones. HTMLFrameOwnerElement::setSandboxFlags calls Frame::updateSandboxFlags on the parent's RemoteFrame, which just sends WebPageProxy::UpdateSandboxFlags. WebPageProxy::updateSandboxFlags stores the flags on the WebFrameProxy and never forwards them, so the iframe's LocalFrame::m_sandboxFlags stays stale. Navigations the UI process moves into another process carry the flags in LoadParameters::effectiveSandboxFlags, which WebPage::loadRequest applies. A navigation the iframe starts itself that stays in its own process doesn't, so Document::initSecurityContext uses the stale flags. Steps to reproduce: 1. Load
https://a.example/
with <iframe src="
https://b.example/1
">. 2. In the parent, run iframe.sandbox = "allow-scripts". 3. In the iframe, run location = "/2". 4. Have /2 render self.origin. Expected: null. HTML applies the iframe's sandboxing flags to its next navigation, whoever starts it. Actual:
https://b.example
. The page is sandboxed as expected without Site Isolation, when the iframe is same-site with the parent, or when the parent starts the navigation. The iframe keeps only the privileges its current document already had, so this isn't a sandbox escape. But the UI process's model is now wrong: WebFrameProxy::didCommitLoad derives an opaque origin from its updated flags, while the document has a real one. As a result, WebPageProxy::postMessageToRemote drops every postMessage from /2 (see the FIXME from
bug 321743
).
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-09-22 16:39:34 PDT
<
rdar://problem/188133096
>
zak ridouh
Comment 2
2026-09-22 16:52:15 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/74626
EWS
Comment 3
2026-09-28 18:34:33 PDT
Committed
322116@main
(7afb5f1f0a0a): <
https://commits.webkit.org/322116@main
> Reviewed commits have been landed. Closing PR #74626 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug