CVE-2026-34778
MEDIUMVulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Anti-spoofing controls
MITRE ATT&CK
1 technique across 1 tactic: Defense Evasion The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | The CVSS score of 5.9 (Medium) with vector AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N indicates this requires network access but with high attack complexity and low privileges (PR:L), yet results in high integrity impact. The high integrity (I:H) component is the primary concern-an attacker can manipulate security-sensitive decisions. However, real-world risk is substantially lower than the CVSS suggests because exploitation requires three preconditions: (1) the application must register a service worker, (2) the attacker must control or inject malicious code into that service worker, and (3) the application must rely on executeJavaScript() return values for security decisions. The absence of public exploit code and lack of CISA KEV listing indicate this is not actively exploited in the wild, though the flaw is structural and would be trivial to exploit if conditions are met. This is a high-integrity, low-automation issue most relevant to developers using deprecated or insecure patterns; modern applications using dedicated IPC channels are naturally resistant. |
| Exploit ScenarioDerived | An attacker with the ability to inject or control a service worker within an Electron application (e.g., via a supply-chain compromise, malicious dependency, or XSS vulnerability in the renderer) could craft a spoofed IPC reply that causes webContents.executeJavaScript() to resolve with fabricated authentication tokens, permission flags, or other sensitive data. The main process, trusting this return value, would make security decisions based on the attacker's injected data rather than legitimate execution results. High attack complexity (AC:H) reflects the requirement to control the service worker context; however, once that condition is met, the exploit is deterministic and requires no additional user interaction (UI:N). No public proof-of-concept has been disclosed, and this is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 03, 2026
Electron's service worker implementation allows spoofing of internal IPC reply messages, enabling a malicious service worker to inject attacker-controlled data into the main process's promise resolution from webContents.executeJavaScript() and related methods. This affects Electron versions prior to 41.0.0, 40.8.1, 39.8.1, and 38.8.6, and impacts only applications that register service workers and rely on executeJavaScript() return values for security decisions. The vulnerability requires local authenticated access and medium attack complexity, with no public exploit code or active exploitation confirmed at analysis time.
RemediationAI
Upgrade Electron to version 41.0.0 or later (recommended for active development), or to the latest patch version within your supported release line: 40.8.1 for the 40.x branch, 39.8.1 for the 39.x branch, or 38.8.6 for the 38.x branch. As an interim workaround before patching, do not use the return value of webContents.executeJavaScript() or webFrameMain.executeJavaScript() for security decisions; instead, implement dedicated and validated IPC channels (using ipcMain/ipcRenderer with explicit message validation) for all security-relevant communication between renderer and main processes. Applications not using service workers or not relying on executeJavaScript() for security logic face minimal real-world risk. Consult https://github.com/advisories/GHSA-xj5x-m3f3-5x3h for additional context.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Electron's webContents.executeJavaScript() and webFrameMain.executeJavaScript() methods use an internal IPC (Inter-Process Communication) channel to transmit code execution results from the renderer process back to the main process. The vulnerability stems from insufficient validation of reply messages on this internal channel (CWE-290: Improper Input Validation), allowing a service worker-which runs within the renderer process context-to craft and inject spoofed messages that the main process accepts as legitimate responses. This breaks the trust boundary between the renderer and main process for security-critical data flows. The NPM package 'electron' across multiple versions (before the fixed versions) is affected, as indicated by the CPE identifiers.
Know when the next one hits your stack
- 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
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
Impact
A service worker running in a session could spoof reply messages on the internal IPC channel used by webContents.executeJavaScript() and related methods, causing the main-process promise to resolve with attacker-controlled data.
Apps are only affected if they have service workers registered and use the result of webContents.executeJavaScript() (or webFrameMain.executeJavaScript()) in security-sensitive decisions.
Workarounds
Do not trust the return value of webContents.executeJavaScript() for security decisions. Use dedicated, validated IPC channels for security-relevant communication with renderers.
Fixed Versions
41.0.040.8.139.8.138.8.6
For more information
If there are any questions or comments about this advisory, please email [security@electronjs.org](mailto:security@electronjs.org)
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
GHSA-xj5x-m3f3-5x3h
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB