---
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: electronjs
product: electron
affected:
  - electron < 39.8.6
  - 'electron >= 40.0.0, < 40.9.0'
  - 'electron >= 41.0.0, < 41.1.1'
  - electron = 42.0.0
patched:
  - electron 41.1.1
published: '2026-08-05'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T13:54:00.020'
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.00132
epssPercentile: 0.02775
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.

## Affected

- `electron < 39.8.6`
- `electron >= 40.0.0, < 40.9.0`
- `electron >= 41.0.0, < 41.1.1`
- `electron = 42.0.0`

## Remediation

Upgrade past the affected range:

- `electron 41.1.1`

## 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
