Improper Restriction of Rendered UI Layers or Frames Affecting electron package, versions <39.8.10>=40.0.0-alpha.2 <41.10.3>=42.0.0-alpha.1 <42.0.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-ELECTRON-18563343
  • published6 Aug 2026
  • disclosed5 Aug 2026
  • creditCiarán

Introduced: 5 Aug 2026

NewCVE-2026-70608  (opens in a new tab)
CWE-1021  (opens in a new tab)

How to fix?

Upgrade electron to version 39.8.10, 41.10.3, 42.0.1 or higher.

Overview

electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

Affected versions of this package are vulnerable to Improper Restriction of Rendered UI Layers or Frames in the OpenURL navigation path, which allows a sandboxed iframe without the allow-popups keyword to open a new window or trigger setWindowOpenHandler without user interaction. An attacker can circumvent intended popup restrictions by embedding untrusted content in a sandboxed iframe and leveraging this navigation path.

Note: This is only exploitable if applications rely solely on the absence of allow-popups in the iframe sandbox to prevent window creation.

Workaround

This vulnerability can be mitigated by returning { action: 'deny' } from setWindowOpenHandler for any content that is not trusted.

CVSS Base Scores

version 4.0
version 3.1