Skip to main content

CVE-2026-34778

MEDIUM
Authentication Bypass by Spoofing (CWE-290)
2026-04-03 https://github.com/electron/electron GHSA-xj5x-m3f3-5x3h
6.5
CVSS 3.1 · NVD
View

Vulnerability 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.

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

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

Alert me

AnalysisAIv1 – 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

npm electron fix: 38.8.6, 39.8.1, 40.8.1, 41.0.0

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

NVD PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Red Hat 5.9 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

3
CVSS changed
Jul 24, 2026 - 22:23 NVD
5.9 (MEDIUM) 6.5 (MEDIUM)
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:44 nvd
MEDIUM 5.9

DescriptionNVD

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.0
  • 40.8.1
  • 39.8.1
  • 38.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

EPSS Score
0.0%
Top 98% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.0%
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
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
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.

Affected Products (CPE)NVD

pkg:npm/electron
pkg:npm/electron
pkg:npm/electron
pkg:npm/electron

Vendor StatusVendor

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