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 package | Versions | Reported 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.8 | CVE List |
| podman-desktop-macos-1-0 | Not specified | CVE List |
| podman-desktop-windows-1-0 | Not specified | CVE List |
| rhdesktop/rh-podman-desktop-ext-openshift-local-rhel10 | Not specified | CVE 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.8 | GitHub Advisory Database |
| electronjs electron | before 38.8.6, from 39.0.0 before 39.8.0, from 40.0.0 before 40.7.0, 41.0.0 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| redhat-SADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
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.840.7.039.8.038.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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34771 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8337-3p73-46f4 changed 2026-04-06 | CC-BY-4.0 |
| NVD | CVE-2026-34771 changed 2026-07-24 | Public domain |