---
id: CVE-2026-70603
title: >-
  Electron is a framework for writing cross-platform desktop applications using
  JavaScript, HTML and CSS
summary: >-
  Electron is a framework for writing cross-platform desktop applications using
  JavaScript, HTML and CSS. Prior to 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1,
  shell.openPath() did not reject paths containing embedded null bytes. Apps
  that p…
severity: medium
cvss: 6
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N'
cwe:
  - CWE-20
  - CWE-158
vendor: electron
product: electron
affected:
  - 'electron >= 42.0.0-alpha.1, < 42.0.0-beta.1'
  - 'electron >= 41.0.0-alpha.1, < 41.1.1'
  - 'electron >= 40.0.0-alpha.1, < 40.9.0'
  - electron < 39.8.6
patched:
  - electron 42.0.0-beta.1
  - electron 41.1.1
  - electron 40.9.0
  - electron 39.8.6
published: '2026-08-05'
updated: '2026-09-08'
sourceUpdated: '2026-09-08T20:44:08.253'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-70603'
references:
  - url: >-
      https://github.com/electron/electron/security/advisories/GHSA-5c9j-mhmv-5xgx
    label: security-advisories@github.com
  - url: 'https://github.com/advisories/GHSA-5c9j-mhmv-5xgx'
tags:
  - nvd
  - ghsa
  - npm
epss: 0.0014
epssPercentile: 0.02713
aliases:
  - GHSA-5c9j-mhmv-5xgx
ecosystem: npm
ingestedAt: '2026-08-05T16:49:29.346Z'
---

## Overview

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1, shell.openPath() did not reject paths containing embedded null bytes. Apps that perform string-only validation of file paths, for example checking the file extension, before passing them to shell.openPath() could be bypassed, allowing an attacker-controlled path to open a different file than the one that passed validation. Apps are only affected if they pass paths derived from untrusted input to shell.openPath() and rely on string-based validation without a filesystem check. This issue is fixed in versions 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-70603)

Affected packages:

- `electron >= 42.0.0-alpha.1, < 42.0.0-beta.1`
- `electron >= 41.0.0-alpha.1, < 41.1.1`
- `electron >= 40.0.0-alpha.1, < 40.9.0`
- `electron < 39.8.6`

Patched in:

- `electron 42.0.0-beta.1`
- `electron 41.1.1`
- `electron 40.9.0`
- `electron 39.8.6`

Source: https://github.com/advisories/GHSA-5c9j-mhmv-5xgx
