Improper input validation in Core (CVE-2026-113189)
A security check in Chromium that prevents popups from covering permission prompts only validates the initial rectangle, not the anchor rectangle used by the Wayland compositor. A compromised renderer could supply a benign initial rectangle and a malicious anchor rectangle to position a popup over a permission prompt, potentially tricking the user into granting permissions.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A security check in Chromium designed to prevent popups from obscuring permission prompts can be bypassed on Linux/Wayland. The check validates the initial rectangle provided by the renderer but fails to validate the anchor rectangle, which is used by the Wayland compositor for final positioning.
Affected files:
content/browser/web_contents/web_contents_impl.cccontent/browser/renderer_host/render_widget_host_view_aura.ccui/ozone/platform/wayland/host/xdg_popup.ccui/ozone/platform/wayland/host/wayland_popup.ccui/views/widget/desktop_aura/desktop_window_tree_host_platform.ccui/views/widget/desktop_aura/desktop_native_widget_aura.cc
Estimated timestamp from git blame: 2023-07-19
Summary
On Linux/Wayland, a compromised renderer can potentially bypass the security gate in WebContentsImpl::ShowCreatedWidget that prevents popups from overlapping sensitive UI elements like permission prompts. The vulnerability exists because the gate only validates the transformed_rect (derived from the renderer's initial_rect) and fails to validate the transformed_anchor_rect. Since the Wayland compositor uses the anchor rectangle for positioning, an attacker can specify a benign initial_rect to pass the check and a malicious anchor_rect to position the popup over the exclusion area.
Technical Details
In content/browser/web_contents/web_contents_impl.cc, the browser implementation of ShowCreatedWidget contains logic to prevent new popups from obscuring permission prompts (lines 5923-5930). This check compares the proposed popup bounds against an exclusion area:
auto permission_exclusion_area_bounds =
PermissionControllerImpl::FromBrowserContext(GetBrowserContext())
->GetExclusionAreaBoundsInScreen(outermost_web_contents);
if (permission_exclusion_area_bounds &&
permission_exclusion_area_bounds->Intersects(transformed_rect)) {
render_widget_host_impl->ShutdownAndDestroyWidget(true);
return;
}
However, it currently only considers the initial_rect provided by the renderer. On Wayland, the final positioning of a popup is handled by the compositor using the xdg_positioner interface. The renderer-supplied anchor_rect is propagated through the following chain:
RenderWidgetHostViewAura::InitAsPopupstores the uncheckedanchor_rectin the window'skOwnedWindowAnchorproperty (line 471).DesktopNativeWidgetAuraensures this property is copied to the platform window's initialization properties.- On Wayland,
WaylandPopupretrieves this viadelegate()->GetOwnedWindowAnchorAndRectInDIP()(line 75). XdgPopup::CreatePositioner(inui/ozone/platform/wayland/host/xdg_popup.cc) uses thisanchor_rectviaxdg_positioner_set_anchor_rect(line 273).- Crucially,
xdg_positioner_set_sizeis called using only the width and height of the bounds; the origin of the previously validatedinitial_rectis discarded by the compositor in favor of anchor-based positioning.
Potential Reproduction Steps
Note: These steps are theoretical as we have not executed code to confirm.
- On a Linux/Wayland environment, trigger a permission prompt to create an 'exclusion area'.
- From a compromised renderer, send a
blink::mojom::PopupWidgetHost::ShowPopupIPC. - Set
initial_rectto a position that does not intersect the exclusion area (e.g.,{x: 0, y: 0, w: 200, h: 200}). - Set
initial_anchor_rectto a position that targets the exclusion area (e.g.,{x: prompt.x(), y: prompt.y() - 1, w: 1, h: 1}). - The browser's check will pass based on the
initial_rect. - The Wayland compositor will receive the malicious
anchor_rectand position the popup relative to it, causing the popup to overlap the permission prompt.
Impact
This is a UI spoofing and clickjacking vulnerability. An attacker could potentially obscure or misrepresent permission prompts (e.g., for Camera, Microphone, or File System access), tricking users into granting sensitive permissions. This requires a compromised renderer and is specific to the Wayland platform on Linux.
Suggested Fix
Modify WebContentsImpl::ShowCreatedWidget to validate the transformed_anchor_rect against the permission_exclusion_area_bounds in addition to the transformed_rect. Alternatively, ensure that the final calculated bounds (if available at that stage) are checked.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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
The security gate in WebContentsImpl::ShowCreatedWidget validates only the transformed_rect (from the renderer's initial_rect) and not the transformed_anchor_rect, which the Wayland compositor uses for final popup positioning.
Impact
An attacker could potentially obscure or misrepresent permission prompts, tricking users into granting sensitive permissions, but this requires a compromised renderer and is specific to the Wayland platform on Linux.
What the attacker needed
Linux/Wayland environment; compromised renderer; permission prompt shown
The fix
Modify WebContentsImpl::ShowCreatedWidget to validate the transformed_anchor_rect against the permission exclusion area bounds in addition to the transformed_rect.
How it was found
- On a Linux/Wayland environment, trigger a permission prompt to create an exclusion area.
- From a compromised renderer, send a ShowPopup IPC message.
- Set initial_rect to a position that does not intersect the exclusion area.
- Set initial_anchor_rect to a position that targets the exclusion area.
- The browser's check passes based on initial_rect.
- The Wayland compositor positions the popup using the malicious anchor_rect, causing it to overlap the permission prompt.
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.
When a website asks for permission to use your camera or microphone, the browser shows a prompt. To stop sneaky popups from covering that prompt, Chromium checks where the popup will appear. On Linux with the Wayland display system, the check only looks at one part of the popup's position and ignores another part that the system actually uses to place the popup. A malicious page could exploit this to put a popup right over the permission prompt, making you think you are clicking something else.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.