Skip to main content

CVE-2026-34777

MEDIUM
Origin Validation Error (CWE-346)
2026-04-03 https://github.com/electron/electron GHSA-r5p7-gp4j-qhrx
5.4
CVSS 3.1 · Vendor: https://github.com/electron/electron
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
Impact

CVSS 5.4 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N) indicates network-accessible, low-complexity attack requiring user interaction but no privileges, with limited confidentiality and integrity impact and no availability impact. However, CVSS alone underrepresents real-world risk: the vulnerability requires both (1) a vulnerable Electron application that decides permissions based on origin rather than details.requestingUrl, and (2) user interaction to load a malicious iframe. The threat is application-specific-well-written apps checking details.requestingUrl are already protected. Exploitation automatable in scope (attacker can craft HTML/JavaScript), but technical impact is permission escalation within a single application context, not OS-level or multi-application compromise. EPSS and KEV data not provided; no public exploit code identified. Priority should be determined by inventory of Electron applications in use and their permission handler implementation patterns.

Exploit ScenarioDerived

An attacker embeds a malicious iframe (e.g., <iframe src="https://attacker.com/steal-camera.html"></iframe>) into a trusted website or compromises a legitimate website to inject the iframe. When the attacker's frame requests media permission, the vulnerable Electron app's permission handler receives the top-level website's origin (e.g., trusteddomain.com) instead of attacker.com and grants access. The iframe can then record video and audio from the user's webcam and microphone without explicit consent for the attacker's origin. This requires user interaction (page load) but no special privileges, and succeeds against any Electron app that decides permissions by origin rather than details.requestingUrl.

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 versions prior to 38.8.6, 39.8.1, 40.8.1, and 41.0.0 pass the top-level page origin instead of the requesting iframe's origin to permission request handlers for fullscreen, pointerLock, keyboardLock, openExternal, and media permissions, allowing attackers to trick applications into granting sensitive permissions to embedded third-party content via social engineering or malicious iframe injection. Unauthenticated remote attackers can exploit this via user interaction (iframe load), with CVSS 5.4 indicating moderate confidentiality and integrity impact; no public exploit code or active exploitation confirmed at time of analysis.

RemediationAI

Upgrade Electron to one of the patched versions: 41.0.0 or later for version 41.x, 40.8.1 or later for version 40.x, 39.8.1 or later for version 39.x, or 38.8.6 or later for version 38.x. Immediately inspect your application's session.setPermissionRequestHandler() implementation and replace any permission grant decisions based on the origin parameter or webContents.getURL() with checks against details.requestingUrl instead; this workaround is effective even before upgrading and is the recommended defensive coding practice. Refer to the Electron security advisory at https://github.com/electron/electron/security/advisories/GHSA-r5p7-gp4j-qhrx for complete guidance.

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 is a framework for building desktop applications using web technologies (Chromium + Node.js). When a frame within a webpage requests sensitive browser permissions (fullscreen, pointer lock, keyboard lock, external URL opening, or media access), Electron invokes the session.setPermissionRequestHandler() callback with a details object containing origin information. The vulnerability exists in the origin parameter passed to this handler-it incorrectly reflects the top-level document's origin (e.g., trusteddomain.com) rather than the origin of the requesting iframe (e.g., attacker.com embedded via <iframe src="https://attacker.com">). This is a logic flaw in CWE-346 (Origin Validation Error); the correct details.requestingUrl property is available but not used by vulnerable application code that relies on the origin parameter or webContents.getURL() for permission decisions.

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

Vendor (https://github.com/electron/electron) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (https://github.com/electron/electron).

CVSS VectorVendor: https://github.com/electron/electron

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

Lifecycle Timeline

2
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:44 nvd
MEDIUM 5.4

DescriptionCVE.org

Impact

When an iframe requests fullscreen, pointerLock, keyboardLock, openExternal, or media permissions, the origin passed to session.setPermissionRequestHandler() was the top-level page's origin rather than the requesting iframe's origin. Apps that grant permissions based on the origin parameter or webContents.getURL() may inadvertently grant permissions to embedded third-party content.

The correct requesting URL remains available via details.requestingUrl. Apps that already check details.requestingUrl are not affected.

Workarounds

In your setPermissionRequestHandler, inspect details.requestingUrl rather than the origin parameter or webContents.getURL() when deciding whether to grant fullscreen, pointerLock, keyboardLock, openExternal, or media permissions.

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 97% 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

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

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