Policy bypass in IFrameSandbox (CVE-2026-5903)
A sandboxed iframe without the allow-popups flag could open new windows by dispatching a synthetic mouse event with modifier keys, because Blink did not check whether the event was trusted. This bypassed the HTML5 sandbox restriction and, in Electron apps like Discord, could lead to remote code execution via shell.openExternal.
- Fix shipped in 56 days
Report description
HTML5 Sandbox Security Model Violation with auxiliary browsing contexts being created despite the lack of "allow-popups" keyword within iframes
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?
The problem
Please describe the technical details of the vulnerability
The vulnerability exists within the Blink rendering engine's handling of navigation policies derived from mouse events. Specifically, the function NavigationPolicyFromEventInternal in third_party/blink/renderer/core/loader/navigation_policy.cc fails to validate the isTrusted property of a MouseEvent before honoring modifier keys (such as ctrlKey or metaKey).
In a standard HTML5 sandbox environment, an iframe without the allow-popups flag is prohibited from opening new auxiliary browsing contexts (windows or tabs). However, this restriction relies on the renderer correctly calculating the Navigation Policy for a given action.
When a user performs a Ctrl+Click (or Cmd+Click on macOS) on a link, Blink translates this into a navigation policy of kNavigationPolicyNewBackgroundTab or kNavigationPolicyNewForegroundTab. The vulnerability arises because JavaScript within a sandboxed iframe can programmatically construct a synthetic MouseEvent with these modifier keys set to true and dispatch it against an anchor element.
Because NavigationPolicyFromEventInternal does not check if the event is trusted (event.isTrusted()), it blindly processes the synthetic modifiers. Consequently, the renderer calculates a "New Tab" navigation policy and requests the browser to open a new window. This effectively bypasses the allow-popups restriction, as the browser treats the request as a legitimate link navigation with a specific disposition, rather than a blocked window.open call.
Impact analysis
This vulnerability is a security bypass of the HTML5 sandbox allow-popups restriction. While typically classified as a sandbox escape in standard browsers (allowing untrusted content to annoy users or facilitate phishing via popups), the impact is significantly amplified in certain Electron-based applications, such as the Discord Desktop Client, where it can serve as a primitive for Remote Code Execution (RCE).
Core Impact: Sandbox Escape & Security Control Bypass
The vulnerability allows sandboxed content (explicitly restricted from creating new windows) to force the creation of an auxiliary browsing context. This directly violates the integrity of the sandbox attribute, rendering the allow-popups flag ineffective against a malicious actor capable of executing JavaScript.
High-Severity Exploitation in Electron (Discord RCE Chain)
In the context of the Discord Desktop Client, this sandbox escape bridges the gap between a restricted renderer process and privileged system operations.
- Mechanism: Electron applications often intercept new window creation events (such as via
webContents.on('new-window')orsetWindowOpenHandler) to delegate external link handling to the operating system usingshell.openExternal(). - The Bypass: Discord implements checks to prevent sandboxed iframes from triggering this flow. However, because the vulnerability forces the Blink engine to classify the synthetic event as a legitimate, user-initiated "New Tab" navigation (via the
kNavigationPolicyNewForegroundTabpolicy), it bypasses renderer-side checks that rely on standardwindow.openrestrictions. - RCE Vector: By successfully triggering
shell.openExternal()with a malicious payload, we demonstrated the ability to execute arbitrary code on the host machine.- Violation: This directly violates the Electron security best practice: " Do not use shell.openExternal with untrusted content". Electron Checklist #15
- Chain:
Sandboxed Iframe->Synthetic Ctrl+Click->Sandbox Bypass (New Window Request)->Electron Interception->shell.openExternal(malicious_URI)->RCE.
This finding confirms that the "One Permitted Navigator" principle and standard event validation are insufficient in their current state to protect embedding contexts from synthetic input attacks.
The cause
What version of Chrome have you found the security issue in?
[145.0.7632.46]
Is the security issue related to a crash?
No, it is not related to a crash.
Choose the type of vulnerability
Sandbox Escape
How would you like to be publicly acknowledged for your report?
Credit to my GitHub @Ciarands
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 the navigation policy calculation did not verify that the mouse event was genuine (isTrusted) before applying modifier keys that request a new tab.
Impact
The sandbox allow-popups restriction is bypassed, and in Electron apps like Discord this could be chained to remote code execution via shell.openExternal.
What the attacker needed
Ability to run JavaScript in a sandboxed iframe; target uses Electron with shell.openExternal
How it was found
- Create a sandboxed iframe without the allow-popups flag.
- Inside the iframe, use JavaScript to construct a synthetic MouseEvent with ctrlKey or metaKey set to true.
- Dispatch that event against an anchor element.
- The browser calculates a new-tab navigation policy and opens a new window, bypassing the sandbox.
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 sandboxed iframe is a web page inside another page that is restricted from doing things like opening new windows. The browser decides whether to allow a new window based on whether the user really clicked with Ctrl held down. The bug let JavaScript fake that click, so the browser opened a new window even though the sandbox said no.
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.