Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Electron: shell.openPath path validation bypass via embedded null byte (CVE-2026-70603)

0
Medium
Published: 08/05/2026 (08/05/2026, 15:57:03 UTC)
Source: GCVE Database
Product: electron

Description

Electron's shell.openPath() function did not properly reject file paths containing embedded null bytes. This allowed attackers to bypass string-only validation checks on file paths, potentially causing the application to open a different file than intended. The issue affects apps that pass untrusted input to shell.openPath() without performing filesystem-level validation. Versions prior to 39.8.6 are vulnerable. The vulnerability has been fixed in versions 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1.

CVSS v3.1

Score 6.0medium

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N

Affected software

npmghsa
electron
Affected versions
>=42.0.0-alpha.1 <42.0.0-beta.1
npmghsa
electron
Affected versions
>=41.0.0-alpha.1 <41.1.1
npmghsa
electron
Affected versions
>=40.0.0-alpha.1 <40.9.0
npmghsa
electron
Affected versions
<39.8.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/05/2026, 23:17:51 UTC

Technical Analysis

The vulnerability in Electron's shell.openPath() arises because it does not reject file paths containing embedded null bytes. Applications that rely solely on string-based validation of file paths (e.g., checking file extensions) before calling shell.openPath() can be bypassed by an attacker supplying a path with an embedded null byte. This causes shell.openPath() to open a different file than the one that passed validation. Node.js filesystem APIs such as fs.existsSync() or fs.stat() already reject null bytes, so applications that perform such checks before calling shell.openPath() are not affected. The issue is fixed in Electron versions 39.8.6 and later.

Potential Impact

An attacker who can supply untrusted input to shell.openPath() in an affected Electron application can bypass string-only path validation checks. This may lead to opening unintended files, potentially exposing sensitive information or causing other unintended behavior. The vulnerability does not affect applications that perform filesystem-level validation or do not pass untrusted input to shell.openPath().

Mitigation Recommendations

A fix is available in Electron versions 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1. Applications should upgrade to one of these versions or later. As a workaround, applications can reject any file path containing a null byte before passing it to shell.openPath(), for example by checking if the path includes '\0' and throwing an error if it does. Applications that perform filesystem checks using Node.js fs APIs before calling shell.openPath() are not affected and do not require additional mitigation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-5c9j-mhmv-5xgx
Osv Schema Version
1.4.0
Aliases
["CVE-2026-70603"]
Ecosystems
["npm"]
Database Specific Severity
MODERATE
Cvss Version
3.1

Threat ID: 6a73851fbf8831d5394ef81a

Added to database: 08/05/2026, 18:46:55 UTC

Last enriched: 08/05/2026, 23:17:51 UTC

Last updated: 08/05/2026, 23:17:51 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses