Permissive Cross-domain Policy with Untrusted Domains Affecting electron package, versions <39.8.10>=40.0.0-alpha.2 <40.9.3>=41.0.0-alpha.1 <41.4.0>=42.0.0-alpha.1 <42.0.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.21% (11th 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 Learn

Learn about Permissive Cross-domain Policy with Untrusted Domains vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-ELECTRON-18563330
  • published6 Aug 2026
  • disclosed5 Aug 2026
  • creditUnknown

Introduced: 5 Aug 2026

NewCVE-2026-70604  (opens in a new tab)
CWE-942  (opens in a new tab)

How to fix?

Upgrade electron to version 39.8.10, 40.9.3, 41.4.0, 42.0.0 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 Permissive Cross-domain Policy with Untrusted Domains via the custom protocol handler when supportFetchAPI is enabled but corsEnabled is not set. An attacker can access sensitive data from a custom scheme by performing cross-origin requests from a remote origin.

Note: This is only exploitable if an application registers a custom scheme with supportFetchAPI: true and corsEnabled: false, and loads remote or untrusted content in a renderer.

Workaround

This vulnerability can be mitigated by setting corsEnabled: true on custom schemes and validating the request Origin in the protocol handler before returning sensitive data.

CVSS Base Scores

version 4.0
version 3.1