CVE-2026-34777: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-34777 is an origin validation error in the Electron framework that causes an incorrect origin to be passed to the session.setPermissionRequestHandler() callback when an embedded iframe requests certain permissions. When an iframe requests fullscreen, pointerLock, keyboardLock, openExternal, or media permissions, the handler receives the top-level page's origin instead of the requesting iframe's origin, potentially allowing third-party embedded content to be granted permissions it should not receive. The vulnerability affects Electron versions below 38.8.6, 39.0.0-alpha.1 through 39.8.1, 40.0.0-alpha.1 through 40.8.1, and 41.0.0-alpha.1 through 41.0.0. It was published on April 2–3, 2026, and carries a CVSS v3.1 base score of 5.4 (Medium) (GitHub Advisory, Electron Advisory).

Technical details

The root cause is classified as CWE-346 (Origin Validation Error): Electron's permission request handling logic incorrectly propagates the top-level webContents URL as the origin when an iframe initiates a permission request, rather than the iframe's own origin. Applications that rely on the origin parameter or webContents.getURL() in their setPermissionRequestHandler callback to make access control decisions will therefore evaluate the wrong origin, potentially granting permissions to untrusted third-party iframes. The correct requesting URL is available via details.requestingUrl, and applications already using this field are unaffected. No public proof-of-concept exploit code has been identified at this time (GitHub Advisory, Electron Advisory).

Impact

Successful exploitation allows a malicious third-party iframe embedded within a trusted Electron application to obtain permissions — such as fullscreen, pointer lock, keyboard lock, access to external URLs, or media (camera/microphone) — that should be restricted to the top-level origin. This results in low confidentiality impact (e.g., unauthorized media access) and low integrity impact (e.g., UI manipulation via fullscreen or pointer lock), with no availability impact. The scope is limited to the affected Electron application's session, but the ability to hijack media or keyboard permissions could facilitate phishing or user deception attacks within the app context (GitHub Advisory).

Exploitability

There is no evidence of active in-the-wild exploitation or public proof-of-concept code for CVE-2026-34777 at this time. The EPSS score is approximately 0.007% (1st percentile), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires user interaction (a user must visit or interact with a page containing a malicious iframe within a vulnerable Electron app), which further limits practical exploitability (GitHub Advisory).

Exploitation steps

  1. Identify a vulnerable target: Find an Electron application using a version below 38.8.6, 39.8.1, 40.8.1, or 41.0.0 that implements session.setPermissionRequestHandler() and grants permissions based on the origin parameter or webContents.getURL() rather than details.requestingUrl.
  2. Embed a malicious iframe: Craft or compromise a web page loaded by the Electron app that embeds a third-party iframe (e.g., <iframe src="https://attacker.example.com/malicious.html">) pointing to attacker-controlled content.
  3. Trigger a permission request from the iframe: From within the malicious iframe, use JavaScript to request a sensitive permission such as fullscreen (element.requestFullscreen()), pointer lock (element.requestPointerLock()), or media access (navigator.mediaDevices.getUserMedia(...)).
  4. Exploit the origin confusion: The Electron permission handler receives the top-level page's trusted origin instead of the iframe's origin. If the app grants the permission based on this spoofed origin, the malicious iframe is granted the requested capability.
  5. Achieve objective: With the granted permission, the attacker can, for example, capture camera/microphone input, lock the pointer to deceive the user, or open external URLs — enabling phishing, surveillance, or UI redressing within the Electron app context (Electron Advisory).

Mitigation and workarounds

Electron has released patched versions: 38.8.6, 39.8.1, 40.8.1, and 41.0.0. Developers should upgrade to one of these versions as the primary remediation. As an immediate workaround without upgrading, modify the setPermissionRequestHandler implementation to inspect details.requestingUrl instead of the origin parameter or webContents.getURL() when making permission grant decisions for fullscreen, pointerLock, keyboardLock, openExternal, and media permissions. IBM has also issued a security bulletin for MongoDB Enterprise Advanced with IBM, which bundles Electron and is affected by this vulnerability (Electron Advisory, IBM Bulletin).

Community reactions

The advisory was published by GitHub user VerteDinde on behalf of the Electron security team on April 2, 2026, and subsequently reviewed and published to the GitHub Advisory Database on April 3, 2026. IBM issued a security bulletin in May 2026 noting that MongoDB Enterprise Advanced with IBM is also affected. Community discussion has been limited, consistent with the low EPSS score and absence of active exploitation (GitHub Advisory, IBM Bulletin).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-966w-4vpf-p7hcHIGH7.1
  • JavaScript logoJavaScript
  • @aloma.io/aloma
NoYesOct 25, 2026
GHSA-mrwp-f3q8-3g9pMEDIUM5.9
  • JavaScript logoJavaScript
  • follow-redirects
NoYesOct 25, 2026
GHSA-hfm3-x63j-7fxpHIGHN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/migrate
NoYesOct 25, 2026
GHSA-6244-vvv9-76f5MEDIUMN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/plugin
NoYesOct 25, 2026
GHSA-q53q-qg98-p9jfHIGHN/A
  • JavaScript logoJavaScript
  • llm-fw
NoYesOct 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management