Skip to main content
Vulnerability Database/CVE-2026-102673

CVE-2026-102673: Electron Framework XSS Vulnerability

CVE-2026-102673 is a cross-site scripting vulnerability in Electron Framework affecting sandboxed iframe popup handling. Attackers can bypass sandbox restrictions to access origin data. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-102673 Overview

CVE-2026-102673 is a sandbox bypass vulnerability in the Electron framework. Popups opened from a sandboxed iframe through the OpenURLFromTab navigation path do not inherit the HTML sandbox restrictions of the parent iframe. This includes links using target="_blank" or middle-click navigations. An untrusted iframe configured with allow-scripts allow-popups can open a popup that runs in the embedding application's full origin. That popup gains access to the embedder's cookies, storage, and same-origin scripting capabilities. Applications that do not embed untrusted content in sandboxed iframes are not affected. The issue is classified under [CWE-346] (Origin Validation Error).

Critical Impact

An untrusted iframe can escape sandbox restrictions and obtain full same-origin access to the embedding Electron application, exposing cookies, persistent storage, and privileged scripting.

Affected Products

  • Electron versions prior to 41.10.4
  • Electron 42.x versions prior to 42.5.2
  • Electron 43.x versions prior to 43.0.0

Discovery Timeline

  • 2026-09-29 - CVE-2026-102673 published to NVD
  • 2026-09-29 - Last updated in NVD database

Technical Details for CVE-2026-102673

Vulnerability Analysis

Electron implements a browser-like navigation path called OpenURLFromTab for handling window and popup requests originating from renderer processes. When a sandboxed iframe requests a new window through this path, Electron creates a new WebContents for the popup. The framework fails to propagate the parent iframe's HTML sandbox flags to that new window. As a result, the popup executes in the embedder's origin without the allow-scripts, allow-popups, or other restrictions that were applied to the source iframe. This breaks the origin isolation guarantee that developers rely on when embedding untrusted third-party content.

Root Cause

The -new-window event handler in lib/browser/api/web-contents.ts did not receive or forward the sandboxFlags parameter from the underlying Chromium navigation call. The downstream guest-window-manager.ts module lacked an inheritedSandboxFlags field on its window creation options. Without this data, the resulting BrowserWindow or WebContents was constructed with no sandbox restrictions applied.

Attack Vector

An attacker who controls content loaded inside a sandboxed iframe with sandbox="allow-scripts allow-popups" can trigger a popup through an anchor tag with target="_blank" or a middle-click navigation. The user interaction requirement (UI:R) is satisfied by ordinary link clicking behavior. Once the popup opens, attacker-controlled JavaScript executes in the embedder's origin and can read authenticated session cookies, localStorage, IndexedDB, and invoke any exposed preload APIs.

typescript
// Patch excerpt from lib/browser/api/web-contents.ts
  if (this.getType() !== 'remote') {
    // Make new windows requested by links behave like "window.open".
-    this.on('-new-window', (event, url, frameName, disposition, rawFeatures, referrer, postData) => {
+    this.on('-new-window', (event, url, frameName, disposition, rawFeatures, referrer, postData, sandboxFlags) => {
      const postBody = postData
        ? {
            data: postData,

Source: GitHub Commit 7ea14d5

typescript
// Patch excerpt from lib/browser/guest-window-manager.ts
  overrideBrowserWindowOptions,
  windowOpenArgs,
  outlivesOpener,
-  createWindow
+  createWindow,
+  inheritedSandboxFlags
}: {
  embedder: WebContents;
  guest?: WebContents;

Source: GitHub Commit e26b264. The fix threads sandboxFlags from the -new-window event into guest-window-manager so that inherited restrictions apply to the newly created window.

Detection Methods for CVE-2026-102673

Indicators of Compromise

  • Unexpected BrowserWindow instances spawned from iframe-origin navigations inside the application.
  • Outbound network requests from popup windows carrying the embedder application's session cookies to third-party origins.
  • preload script APIs invoked from windows whose opener is an untrusted iframe origin.

Detection Strategies

  • Audit application source for use of the sandbox attribute on iframes that load third-party or user-supplied content.
  • Inspect did-create-window and new-window handlers for missing origin validation on the opener.
  • Run integration tests that assert popup windows opened from sandboxed iframes are themselves sandboxed.

Monitoring Recommendations

  • Log navigation events and popup creation with opener frame origin and sandbox flag state.
  • Alert on any popup whose runtime origin equals the embedder origin but whose opener chain includes an untrusted iframe.
  • Monitor Electron version telemetry across deployed desktop clients to identify hosts still running vulnerable releases.

How to Mitigate CVE-2026-102673

Immediate Actions Required

  • Upgrade Electron to 41.10.4, 42.5.2, or 43.0.0 and rebuild affected desktop applications.
  • Inventory all iframes in the application that load third-party or user-supplied content.
  • Distribute the patched application build to end users through the standard auto-update channel.

Patch Information

The fix is tracked in GitHub Pull Request #52133 and applied across commits 7ea14d5, e26b264, and ebe1165. Patched releases are published as v41.10.4, v42.5.2, and v43.0.0. Details are documented in GitHub Security Advisory GHSA-hq2x-r82h-9wj4.

Workarounds

  • Handle the setWindowOpenHandler callback on affected WebContents and deny popups originating from untrusted iframe frames.
  • Remove allow-popups from the sandbox attribute on iframes that render untrusted content until the upgrade is deployed.
  • Route all external links through a controlled handler that opens them in the system browser instead of a new BrowserWindow.
bash
# Verify installed Electron version in a project
npx electron --version

# Upgrade to a patched release
npm install electron@43.0.0 --save-dev

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.