Skip to main content

Electron EUVDEUVD-2026-53436

| CVE-2026-70603 MEDIUM
Improper Input Validation (CWE-20)
2026-08-05 GitHub_M GHSA-5c9j-mhmv-5xgx
6.0
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply untrusted path containing embedded null byte
  2. Delivery
    Pass string-only extension validation check
  3. Exploit
    shell.openPath() receives unsanitized path
  4. Execution
    OS runtime truncates at null byte boundary
  5. Persist
    Unintended file resolved and opened
  6. Impact
    Arbitrary file execution or sensitive file exposure

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Three conditions must all be true simultaneously: (1) the Electron application must accept file path input derived from an untrusted or attacker-influenced source - this includes renderer-to-main IPC, protocol handlers, CLI arguments, or any externally supplied string used as a path; (2) the application must validate the path using JavaScript string operations only (e.g., path.endsWith('.pdf'), /\.txt$/.test(path)) without making any Node.js fs API call (fs.existsSync, fs.stat, fs.access, fs.realpath) on that path before passing it to shell.openPath() - apps that call any fs method are not affected because Node already rejects null-byte paths at that layer; and (3) the attacker must be able to inject a null byte into the path string reaching the application. Additionally, CVSS UI:R indicates user interaction is required to trigger the file-open action, limiting automated or fully silent exploitation. The combination of AC:H and these three specific preconditions means the vast majority of Electron applications - those that either do not use shell.openPath() with untrusted input, or that perform any fs-level check - are not affected.

Impact

The CVSS 3.1 score of 6.0 accurately reflects a constrained attack surface: AV:L confines exploitation to the local context of a running Electron application, AC:H requires a specific and relatively uncommon application code pattern (untrusted input + string-only validation + shell.openPath()), PR:L requires the attacker to have some level of access to supply crafted input, and UI:R means a user action (e.g., opening a file) must trigger the vulnerable path. The C:H/I:H impact metrics are realistic - arbitrary file execution or exposure is the outcome - but the conditions required to reach that impact are narrow. No EPSS score is present in the source data, preventing quantitative exploitation probability assessment; this absence should be noted by security teams. No CISA KEV listing and no public POC code are confirmed, indicating this is not actively exploited at scale. Real-world risk is primarily relevant to Electron apps in environments where attackers can influence file path inputs - for example, apps that handle user-supplied URLs, IPC messages from web content, or file paths from external data sources - and where developers have relied solely on string-based path validation rather than filesystem-level checks.

Exploit ScenarioDerived

An attacker who can supply a crafted file path to a vulnerable Electron application - for instance, via an IPC message from a renderer process, a URI handler, a CLI argument, or an application-level file picker that accepts external input - provides a path such as '/safe/uploads/report.pdf\0/tmp/malware.exe'. The application's string-based validation checks the extension, finds '.pdf', and passes the path to shell.openPath(); the OS runtime interprets the string up to the null byte, resolving to '/tmp/malware.exe' and launching the attacker's payload in the user's desktop context. No public exploit code is known at time of analysis, but null-byte injection as a technique is well-documented and the exploitation concept is straightforward for developers familiar with the pattern.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 05, 2026

Path validation bypass in Electron's shell.openPath() allows an attacker-controlled file to be opened in place of one that passed string-based extension validation, due to embedded null bytes not being rejected before OS-level path resolution. Electron-based desktop applications that accept untrusted file paths, validate them using only JavaScript string methods (e.g., endsWith(), regex extension checks), and then pass them to shell.openPath() are affected; apps using Node.js fs APIs (fs.existsSync(), fs.stat()) prior to the call are explicitly not vulnerable. Fixed in versions 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1; no public exploit identified at time of analysis.

RemediationAI

Upgrade Electron to a patched release: 39.8.6 (stable 39.x line), 40.9.0 (stable 40.x line), 41.1.1 (stable 41.x line), or 42.0.0-beta.1 (beta line), as documented at https://github.com/electron/electron/security/advisories/GHSA-5c9j-mhmv-5xgx. For applications that cannot immediately upgrade, the vendor-recommended workaround is to explicitly reject any path containing a null byte before passing it to shell.openPath(): enforce if (filePath.includes('\0')) throw new Error('invalid path'); at every call site. A structurally stronger mitigation - independent of the Electron version - is to perform a filesystem-level existence check using Node's fs.existsSync() or fs.stat() before calling shell.openPath(), as Node fs APIs already reject null-byte paths; this approach has the additional benefit of confirming the file exists and is accessible. Applications that do not pass untrusted input to shell.openPath() require no remediation action.

Affected VersionsENISA

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

Affected Packages

npm electron fix: 39.8.6, 40.9.0, 41.1.1, 42.0.0-beta.1
euvd electron_40_0_0_alpha_1 fix: 40.9.0
euvd electron_41_0_0_alpha_1 fix: 41.1.1
euvd electron_42_0_0_alpha_1 fix: 42.0.0-beta.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Electron (npm package, cpe:2.3:a:electron:electron:*) is a cross-platform desktop application framework combining Chromium and Node.js. Its shell.openPath() function delegates a file path string to the underlying OS shell for opening, but prior to the fix, it passed the string without null-byte sanitization. This creates a classic null-byte injection condition (CWE-20, Improper Input Validation): at the JavaScript layer, a path like '/valid/document.pdf\0/malicious.exe' appears to end in '.pdf', but POSIX/C runtime string functions treat '\0' as a string terminator, so the OS may resolve only '/valid/document.pdf' or exhibit platform-dependent truncation behavior. Node.js fs APIs already guard against this - they throw on null-byte paths - so apps that call any fs method on the path before shell.openPath() are protected by that existing guard. The vulnerability exists precisely in the gap between JavaScript-layer string validation and native OS path resolution.

Know when Electron gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.0 MEDIUM
AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
vuln.today AI 6.0 MEDIUM

Local vector because exploitation requires influencing a running desktop app's input; AC:H reflects mandatory triple precondition (untrusted input + string-only validation + shell.openPath call); PR:L for attacker's ability to supply input; UI:R because user triggers the file-open action; no availability impact.

3.1 AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
4.0 AV:L/AC:H/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Aug 05, 2026 - 17:02 EUVD
CVE Published
Aug 05, 2026 - 15:56 cve.org
MEDIUM 6.0

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
High
powers widely deployed apps: VS Code, Slack, Discord, Teams
Threat Intel
1
1 sources
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2018-1000006 HIGH POC
8.8 Jan 24

GitHub Electron versions 1.8.2-beta.3 and earlier, 1.7.10 and earlier, 1.6.15 and earlier has a vulnerability in the pro

CVE-2025-68669 CRITICAL POC
9.6 Dec 23

Remote code execution in 5ire 0.15.2 and earlier arises because the desktop AI assistant renders Mermaid diagrams with s

CVE-2025-67744 CRITICAL POC
9.6 Dec 16

Cross-site scripting in DeepChat's Mermaid diagram renderer escalates to full remote code execution on affected desktop

CVE-2025-66481 CRITICAL POC
9.6 Dec 09

Remote code execution in DeepChat 0.5.1 and below is possible through a cross-site scripting flaw in Mermaid diagram ren

CVE-2026-93922 HIGH POC
8.6 Sep 18

Stored cross-site scripting in SiYuan through 3.8.4 lets an attacker who can set a notebook name containing an HTML payl

CVE-2017-12581 HIGH POC
8.1 Aug 06

GitHub Electron before 1.6.8 allows remote command execution because of a nodeIntegration bypass vulnerability. Rated hi

CVE-2018-15685 HIGH POC
8.1 Aug 23

GitHub Electron 1.7.15, 1.8.7, 2.0.7, and 3.0.0-beta.6, in certain scenarios involving IFRAME elements and "nativeWindow

CVE-2018-1000136 HIGH POC
8.1 Mar 23

Electron version 1.7 up to 1.7.12; 1.8 up to 1.8.3 and 2.0.0 up to 2.0.0-beta.3 contains an improper handling of values

CVE-2024-39698 HIGH POC
7.5 Jul 09

electron-updater allows for automatic updates for Electron apps. Rated high severity (CVSS 7.5), this vulnerability is r

CVE-2026-70604 HIGH POC
7.4 Aug 05

Cross-origin read bypass in Electron's custom protocol handler exposes sensitive application data to remote pages via fe

CVE-2026-70611 MEDIUM POC
6.9 Aug 05

Native code execution outside the Chromium sandbox is achievable in Electron prior to 39.8.9, 40.9.2, 41.2.1, and 42.0.0

CVE-2020-4077 CRITICAL
9.9 Jul 07

In Electron before versions 7.2.4, 8.2.4, and 9.0.0-beta21, there is a context isolation bypass. Rated critical severity

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy