CVE-2026-34771
JSON

7.5high

Electron: Use-after-free in WebContents fullscreen, pointer-lock, and keyboard-lock permission callbacks

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.32% (higher than 27% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8337-3p73-46f4

Description

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8, apps that register an asynchronous session.setPermissionRequestHandler() may be vulnerable to a use-after-free when handling fullscreen, pointer-lock, or keyboard-lock permission requests. If the requesting frame navigates or the window closes while the permission handler is pending, invoking the stored callback dereferences freed memory, which may lead to a crash or memory corruption. Apps that do not set a permission request handler, or whose handler responds synchronously, are not affected. This issue has been patched in versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8.

Affected

Product or packageVersionsReported by
electron electron< 38.8.6, >= 39.0.0-alpha.1, < 39.8.0, >= 40.0.0-alpha.1, < 40.7.0, >= 41.0.0-alpha.1, < 41.0.0-beta.8CVE List
podman-desktop-macos-1-0Not specifiedCVE List
podman-desktop-windows-1-0Not specifiedCVE List
rhdesktop/rh-podman-desktop-ext-openshift-local-rhel10Not specifiedCVE List
electron (npm)before 38.8.6, from 39.0.0-alpha.1 before 39.8.0, from 40.0.0-alpha.1 before 40.7.0, from 41.0.0-alpha.1 before 41.0.0-beta.8GitHub Advisory Database
electronjs electronbefore 38.8.6, from 39.0.0 before 39.8.0, from 40.0.0 before 40.7.0, 41.0.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
redhat-SADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-364CWE-416

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8, apps that register an asynchronous session.setPermissionRequestHandler() may be vulnerable to a use-after-free when handling fullscreen, pointer-lock, or keyboard-lock permission requests. If the requesting frame navigates or the window closes while the permission handler is pending, invoking the stored callback dereferences freed memory, which may lead to a crash or memory corruption. Apps that do not set a permission request handler, or whose handler responds synchronously, are not affected. This issue has been patched in versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8.

GitHub Advisory Database
Impact

Apps that register an asynchronous session.setPermissionRequestHandler() may be vulnerable to a use-after-free when handling fullscreen, pointer-lock, or keyboard-lock permission requests. If the requesting frame navigates or the window closes while the permission handler is pending, invoking the stored callback dereferences freed memory, which may lead to a crash or memory corruption.

Apps that do not set a permission request handler, or whose handler responds synchronously, are not affected.

Workarounds

Respond to permission requests synchronously, or deny fullscreen, pointer-lock, and keyboard-lock requests if an asynchronous flow is required.

Fixed Versions
  • 41.0.0-beta.8
  • 40.7.0
  • 39.8.0
  • 38.8.6
For more information

If there are any questions or comments about this advisory, please email security@electronjs.org

NVD (es)

Electron es un framework para escribir aplicaciones de escritorio multiplataforma usando JavaScript, HTML y CSS. Antes de las versiones 38.8.6, 39.8.0, 40.7.0 y 41.0.0-beta.8, las aplicaciones que registran un session.setPermissionRequestHandler() asíncrono pueden ser vulnerables a un uso después de liberación al gestionar solicitudes de permiso de pantalla completa, bloqueo de puntero o bloqueo de teclado. Si el marco solicitante navega o la ventana se cierra mientras el gestor de permisos está pendiente, invocar la devolución de llamada almacenada desreferencia memoria liberada, lo que puede llevar a un fallo o corrupción de memoria. Las aplicaciones que no establecen un gestor de solicitudes de permiso, o cuyo gestor responde sincrónicamente, no se ven afectadas. Este problema ha sido parcheado en las versiones 38.8.6, 39.8.0, 40.7.0 y 41.0.0-beta.8.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-34771 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-8337-3p73-46f4 changed 2026-04-06CC-BY-4.0
NVDCVE-2026-34771 changed 2026-07-24Public domain