Skip to content
UI spoofing Advisory Advanced CVE-2026-5891

Insufficient policy enforcement in browser UI (CVE-2026-5891)

The browser-side handler for opening new windows did not check the iframe sandbox's allow-popups flag, relying only on a renderer-side check. A compromised renderer in a sandboxed iframe could therefore open arbitrary popup windows that the sandbox was meant to block.

Tianyi Hu Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 42 days

Report description

Sandboxed iframe bypasses allow-popups restriction via CreateNewWindow Mojo IPC — browser has zero sandbox enforcement


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_frame_host_impl.cc


The problem

Please describe the technical details of the vulnerability

RenderFrameHostImpl::CreateNewWindow() in content/browser/renderer_host/render_frame_host_impl.cc does not check the allow-popups sandbox flag (WebSandboxFlags::kPopups) before opening a new window. The sandbox enforcement for popup creation is only performed on the renderer side in create_window.cc. A compromised renderer in a sandboxed iframe can call the CreateNewWindow Mojo IPC directly with allow_popup=true, bypassing all Blink-side sandbox enforcement and opening arbitrary popups.

Vulnerable files:

Transmission chain:

  1. A sandboxed <iframe sandbox="allow-scripts allow-same-origin"> (without allow-popups) contains a compromised renderer.
  2. The renderer patches out the Blink-side IsSandboxed(kPopups) check in create_window.cc:347-358 — the only enforcement point — and sets params->allow_popup = true unconditionally in render_frame_impl.cc:6779-6781.
  3. RenderFrameHostImpl::CreateNewWindow() receives the IPC. It computes effective_transient_activation_state by OR-ing params->allow_popup directly:
C++
// render_frame_host_impl.cc:9994-9997
bool effective_transient_activation_state =
    params->allow_popup || HasTransientUserActivation() ||
    (transient_allow_popup_.IsActive() &&
     params->disposition == WindowOpenDisposition::NEW_POPUP);
  1. Since params->allow_popup = true, effective_transient_activation_state is true regardless of any sandbox restrictions.
  2. CanCreateWindow() is called with effective_transient_activation_state=true — popup is allowed. No IsSandboxed() check anywhere in the browser handler.
  3. The new window opens in full non-sandboxed browser context.

The renderer-side sandbox check in create_window.cc:

C++
// create_window.cc:347-358
if (opener_window.IsSandboxed(
        network::mojom::blink::WebSandboxFlags::kPopups)) {
  opener_window.AddConsoleMessage(...
      "Blocked opening '...' in a new window because the request was made "
      "in a sandboxed frame whose 'allow-popups' permission is not set.");
  return nullptr;
}

...is Blink renderer code only. The browser-side CreateNewWindow() handler has no equivalent check — IsSandboxed() and WebSandboxFlags::kPopups do not appear anywhere in the method.

Steps to reproduce:

  1. Apply h6_patch_renderer_poc.diff to chromium-stable/src/ (Chrome 145.0.7632.117):

    cd chromium-stable/src
    git apply h6_patch_renderer_poc.diff
    
  2. Build Chrome:

    autoninja -C out/Default chrome
    
  3. Start the PoC HTTP server:

    python3 serve.py
    
  4. Launch the patched Chrome:

    out/Default/Chromium.app/Contents/MacOS/Chromium \
      --user-data-dir=/tmp/chrome-h6-test \
      http://localhost:8080/index.html
    
  5. After 1 second, pwned.html opens in a new popup window — despite the iframe having sandbox="allow-scripts allow-same-origin" with no allow-popups.

h6_patch_renderer_poc.diff simulates a compromised renderer by (1) removing the IsSandboxed(kPopups) check from create_window.cc and (2) forcing params->allow_popup = true unconditionally in render_frame_impl.cc. In practice, a compromised renderer would call the CreateNewWindow Mojo IPC directly with allow_popup=true, skipping Blink entirely.

Bisect:

Introducing commit: c4cb716e319efaa1c2582565c5f18965dfa39366

Evidence:

  • Gitiles blame on render_frame_host_impl.cc line 9994 (params->allow_popup || HasTransientUserActivation()) traces directly to this commit.
  • This CL introduced effective_transient_activation_state which OR-s the renderer-supplied mimic_user_gesture (later renamed allow_popup) into the browser's activation decision, with no IsSandboxed(kPopups) check.
  • The field was later renamed mimic_user_gesture → allow_popup in commit 8601a5646d6e (Mustaq Ahmed, 2020-01-31, CL: https://chromium-review.googlesource.com/c/chromium/src/+/2031187, refs/heads/master@{#737378}), but the missing browser-side sandbox check persisted.
  • The renderer-side IsSandboxed(kPopups) check in create_window.cc has existed since the early Blink sandbox implementation and was never mirrored browser-side.

Earliest affected: Chrome M68 (stable July 2018, when c4cb716e landed). Latest confirmed: Chrome M145 (145.0.7632.117, current Stable). Vulnerable for ~7.5 years.

Suggested fix:

I will upload a Gerrit CL with this fix to chromium-review.googlesource.com and add the link in a follow-up comment. h6_fix.diff is attached for reference.

Add a browser-side sandbox check in RenderFrameHostImpl::CreateNewWindow(), after the fenced frame check and before effective_transient_activation_state is computed:

Diff
+  // Sandboxed frames without allow-popups cannot open new windows.
+  // This enforces the kPopups sandbox flag browser-side; the renderer-side
+  // check in create_window.cc can be bypassed by a compromised renderer
+  // sending allow_popup=true in the Mojo params.
+  if (IsSandboxed(network::mojom::WebSandboxFlags::kPopups)) {
+    bad_message::ReceivedBadMessage(
+        GetProcess(),
+        bad_message::RFH_CREATE_NEW_WINDOW_FROM_SANDBOXED_FRAME);
+    std::move(callback).Run(mojom::CreateNewWindowStatus::kBlocked, nullptr);
+    return;
+  }

And in bad_message.h, after RFH_CREATE_NEW_WINDOW_INVALID_DISPOSITION = 334:

Diff
+  RFH_CREATE_NEW_WINDOW_FROM_SANDBOXED_FRAME = 335,

This mirrors the renderer-side check but enforces it browser-side with ReceivedBadMessage to kill the compromised renderer. IsSandboxed() uses the browser's own active_sandbox_flags() which cannot be forged by a compromised renderer.

Verified: applying both h6_patch_renderer_poc.diff and h6_fix.diff, the exploit is blocked and the renderer process is terminated. Normal popups from non-sandboxed frames still work correctly.

Impact analysis

A compromised renderer inside a sandboxed iframe (e.g., a sandboxed ad frame with sandbox="allow-scripts allow-same-origin") can open arbitrary popup windows, bypassing the allow-popups sandbox restriction.

Exploitation requires a compromised renderer (renderer RCE), which is a standard assumption in Chrome's threat model. The attacker gains the ability to:

  • Open arbitrary popups from content that is explicitly sandboxed to prevent popup creation
  • Bypass the iframe sandbox contract that embedders rely on to restrict ad/third-party content
  • UI spoofing and phishing — a sandboxed ad frame could open convincing browser windows mimicking security dialogs or login pages
  • Popup flood attacks — repeatedly open windows from a sandboxed context that should not have this capability
  • Bypass permission-policy enforcement — sites use allow-popups restriction to prevent untrusted third-party content from opening new browsing contexts

The allow-popups sandbox flag exists specifically to prevent untrusted content from opening new windows. The browser's failure to enforce this flag means the sandbox guarantee is illusory against a compromised renderer.

This is the same vulnerability class as H4 (download sandbox bypass via DownloadURL) and H1 (user gesture spoofing), both previously accepted. The pattern: renderer-only enforcement of a WebSandboxFlags restriction, with the browser unconditionally trusting a renderer-supplied parameter.


The cause

What version of Chrome have you found the security issue in?

145.0.7632.117 (Stable, current as of February 25, 2026)

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Site Isolation Bypass

How would you like to be publicly acknowledged for your report?

Tianyi Hu

The original report as published on the Chromium issue tracker, by Tianyi Hu. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 browser-side CreateNewWindow handler trusted a renderer-supplied allow_popup parameter and never checked the frame's own sandbox flags, so the only enforcement lived in the renderer.

Impact

A compromised renderer inside a sandboxed frame could open arbitrary popups, enabling UI spoofing, phishing and popup floods, though exploitation requires a renderer compromise first.

What the attacker needed

Compromised renderer process; sandboxed iframe without allow-popups

The fix

A browser-side sandbox check should be added in CreateNewWindow that blocks the request and terminates the renderer when the frame lacks allow-popups; the reporter verified this fix blocks the exploit.

How it was found

  1. Apply the provided patch that simulates a compromised renderer by removing the renderer-side sandbox check and forcing the allow_popup parameter to true.
  2. Build Chrome from the patched source.
  3. Start the proof-of-concept web server.
  4. Launch the patched Chrome against the local test page.
  5. Observe that a new popup window opens from an iframe sandboxed without allow-popups.

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 sandbox is a set of restrictions a website puts on embedded content, such as an advert inside a frame. One rule, allow-popups, stops that content from opening new windows. The check for this rule only existed in the part of the browser that renders pages, so if that part were taken over, it could simply skip the check and ask the browser core to open a window, which it did without asking any questions.

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.

More by Tianyi Hu

View all

6 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

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.