Insufficient policy enforcement in ControlledFrame (CVE-2026-17743)
A race condition during window attachment allows a ControlledFrame guest to bypass the embedder's Permissions-Policy for sensitive APIs like Geolocation. If guest navigation finishes while attachment is delayed by pending content script operations, policy checks are skipped and the permission request is incorrectly queued and later delivered.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.
Overview: A race condition during window attachment allows a ControlledFrame guest to bypass the embedder's Permissions-Policy for sensitive APIs like Geolocation. If guest navigation finishes while attachment is delayed by pending content script operations, policy checks are skipped and the permission request is incorrectly queued and later delivered. This bypasses the browser's declarative cross-origin restrictions.
Affected files:
chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.ccextensions/browser/guest_view/web_view/web_view_guest.cccomponents/guest_view/browser/guest_view_base.cc
Estimated timestamp from git blame: 2025-06-06
Summary
There is a potential vulnerability in ChromeWebViewPermissionHelperDelegate where a fail-open logic error allows ControlledFrame guests to bypass their embedder's Permissions-Policy.
Functions handling permission requests (such as RequestGeolocationPermission, RequestFullscreenPermission, RequestClipboardReadWritePermission, and RequestHidPermission) attempt to enforce the embedder's policy using short-circuiting logic:
if (web_view_guest()->attached() &&
web_view_guest()->IsOwnedByControlledFrameEmbedder() &&
!IsFeatureEnabledByEmbedderPermissionsPolicy(...)) {
std::move(callback).Run(false);
return;
}
If attached() evaluates to false, the entire policy check is skipped. The method then calls web_view_permission_helper()->RequestPermission(), which queues the event in pending_events_ until the guest is attached, at which point it is dispatched to the embedder.
In the default non-MPArch implementation, GuestViewBase::AttachToOuterWebContentsFrame resumes a new window's navigation before completing the attachment process. It sets attach_in_progress_ = true (which forces attached() to return false) and schedules DidAttach() via SignalWhenReady(). If there are any pending content script operations (addContentScripts), SignalWhenReady() delays the execution of DidAttach().
During this delay, the resumed guest navigation can commit, and the newly loaded cross-origin page can request permissions. Because attached() is false, the policy check is skipped, and the request is queued. Once attachment completes, the embedder receives the event. If the embedder approves it (assuming the browser has already enforced the declarative policy), the guest gains unauthorized access.
Potential Exploitation Steps
Note: These are suggested steps based on static code analysis; our tooling agent does not currently run live Proof of Concepts.
- An attacker controls a guest frame inside an Isolated Web App (IWA). The IWA has a strict
Permissions-Policy(e.g.,geolocation=(self)). - The attacker's guest executes
window.open("https://malicious-origin.com/"). - The browser suspends the new window and sends a
newwindowevent to the embedder. - The embedder handles the event and calls
e.window.attach(...). - To trigger the race, either the attacker (if they found a way) or the embedder application triggers an
addContentScriptsoperation on anyControlledFramein the sameBrowserContext. This causesWebViewContentScriptManagerto delay theDidAttach()callback. - While
attach_in_progress_is true andDidAttachis delayed, the cross-origin navigation completes. The malicious page immediately callsnavigator.geolocation.getCurrentPosition(). - The policy check short-circuits. The event is queued and later sent to the embedder when
DidAttachfinally runs. - The embedder calls
allow()on the permission request, resulting in a full bypass of thePermissions-Policy.
Suggested Fix
Do not fail-open if the guest is not attached. The logic should mirror RequestMediaAccessPermissionForControlledFrame, which explicitly denies requests from unattached guests:
if (!web_view_guest()->attached()) {
// Deny request immediately.
return;
}
Alternatively, evaluate the Permissions-Policy inside the response handler (e.g., OnGeolocationPermissionResponse) just before calling RequestEmbedderFramePermission, ensuring the guest's origin is validated at the time the permission is actually granted.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a fail-open logic error: the permission check only runs when the guest is already attached, so a request made during the attachment delay skips the policy check and is queued instead of denied.
Impact
If the embedder approves the queued request, the guest gains unauthorised access to sensitive APIs such as geolocation, bypassing the embedder's Permissions-Policy; the report notes the steps are based on static analysis and no live proof of concept was run.
What the attacker needed
Attacker controls a guest frame in an IWA; embedder has a strict Permissions-Policy; embedder calls attach on the new window; addContentScripts operation delays attachment
The fix
The logic should deny requests from unattached guests immediately, or re-evaluate the Permissions-Policy inside the response handler before granting the permission.
How it was found
- An attacker controls a guest frame inside an Isolated Web App with a strict Permissions-Policy.
- The guest opens a new window to a malicious origin.
- The browser suspends the new window and sends a newwindow event to the embedder.
- The embedder handles the event and calls attach on the new window.
- An addContentScripts operation on any ControlledFrame in the same BrowserContext delays the DidAttach callback.
- While attachment is delayed, the cross-origin navigation completes and the malicious page requests geolocation.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A web page can embed another page in a frame and set rules about what that frame is allowed to do, such as use the location feature. This report found a timing problem: if the frame finishes loading at just the wrong moment, the browser forgets to check those rules. The frame can then ask for location access and the request is passed to the embedding page, which may approve it without realising the rules were skipped.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.