CVE-2026-102674: Electron: Windows opened from a sandboxed top-level document do not inherit its sandbox restrictions
Impact
Windows opened from a sandboxed top-level document did not inherit that document's HTML sandbox restrictions, so content that was meant to run sandboxed could open a window with the app's full origin. GHSA-hq2x-r82h-9wj4 covers the same issue for sandboxed iframes.
Apps are only affected if they render untrusted content in a sandboxed top-level document that allows popups. Apps that deny popups from untrusted content with setWindowOpenHandler are not affected.
Workarounds
Return { action: 'deny' } from setWindowOpenHandler for windows opened by untrusted content.
Fixed Versions
44.0.0-beta.5 43.4.1 42.9.2 41.10.6
For more information
If you have any questions or comments about this advisory, email us at security@electronjs.org
Other sources
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 41.10.6, 42.9.2, 43.4.1, and 44.0.0-beta.5, windows opened from a sandboxed top-level document did not inherit that document's active HTML sandbox restrictions. Untrusted content in a sandboxed top-level document that was permitted to open popups could therefore create a window with the Electron application's full origin instead of the restricted origin intended by the sandbox. Applications that deny such popups with setWindowOpenHandler are not affected. This issue is fixed in versions 41.10.6, 42.9.2, 43.4.1, and 44.0.0-beta.5.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/electronto a version that resolves this vulnerability.Fixed in 44.0.0-beta.5 - Upgrade
Upgrade
npm/electronto a version that resolves this vulnerability.Fixed in 43.4.1 - Upgrade
Upgrade
npm/electronto a version that resolves this vulnerability.Fixed in 42.9.2 - Upgrade
Upgrade
npm/electronto a version that resolves this vulnerability.Fixed in 41.10.6 - Upgrade
Upgrade
Electronto a version that resolves this vulnerability.Fixed in 41.10.6 - Upgrade
Upgrade
Electronto a version that resolves this vulnerability.Fixed in 42.9.2 - Upgrade
Upgrade
Electronto a version that resolves this vulnerability.Fixed in 43.4.1 - Upgrade
Upgrade
Electronto a version that resolves this vulnerability.Fixed in 44.0.0-beta.5 - Configuration
Return { action: 'deny' } from setWindowOpenHandler for windows opened by untrusted content.
Electron setWindowOpenHandler = { action: 'deny' }
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications are affected if they load untrusted content in a sandboxed top-level document and permit that content to open popups. Applications that deny these popups with setWindowOpenHandler are not affected.
What does an attacker need to exploit it?
An attacker needs untrusted content executing in a sandboxed top-level document that is allowed to open a new window. The opened window can then receive the Electron application's full origin rather than the sandbox-restricted origin.
Which Electron releases contain the fix?
The issue is fixed in Electron 41.10.6, 42.9.2, 43.4.1, and 44.0.0-beta.5.
What can be done before updating Electron?
Deny popup creation from the affected content using setWindowOpenHandler. The advisory states that applications which deny such popups are not affected.