CVE-2026-34774
JSON

8.1high

Electron: Use-after-free in offscreen child window paint callback

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.49% (higher than 44% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-532v-xpq5-8h95

Description

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 39.8.1, 40.7.0, and 41.0.0, apps that use offscreen rendering and allow child windows via window.open() may be vulnerable to a use-after-free. If the parent offscreen WebContents is destroyed while a child window remains open, subsequent paint frames on the child dereference freed memory, which may lead to a crash or memory corruption. Apps are only affected if they use offscreen rendering (webPreferences.offscreen: true) and their setWindowOpenHandler permits child windows. Apps that do not use offscreen rendering, or that deny child windows, are not affected. This issue has been patched in versions 39.8.1, 40.7.0, and 41.0.0.

Affected

Product or packageVersionsReported by
electron electron< 39.8.1, >= 40.0.0-alpha.1, < 40.7.0, >= 41.0.0-alpha.1, < 41.0.0CVE 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 39.8.1, from 40.0.0-alpha.1 before 40.7.0, from 41.0.0-alpha.1 before 41.0.0GitHub Advisory Database
electronjs electronbefore 39.8.1, from 40.0.0 before 40.7.0, 41.0.0NVD

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
redhat-SADP8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-416CWE-825

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 39.8.1, 40.7.0, and 41.0.0, apps that use offscreen rendering and allow child windows via window.open() may be vulnerable to a use-after-free. If the parent offscreen WebContents is destroyed while a child window remains open, subsequent paint frames on the child dereference freed memory, which may lead to a crash or memory corruption. Apps are only affected if they use offscreen rendering (webPreferences.offscreen: true) and their setWindowOpenHandler permits child windows. Apps that do not use offscreen rendering, or that deny child windows, are not affected. This issue has been patched in versions 39.8.1, 40.7.0, and 41.0.0.

GitHub Advisory Database
Impact

Apps that use offscreen rendering and allow child windows via window.open() may be vulnerable to a use-after-free. If the parent offscreen WebContents is destroyed while a child window remains open, subsequent paint frames on the child dereference freed memory, which may lead to a crash or memory corruption.

Apps are only affected if they use offscreen rendering (webPreferences.offscreen: true) and their setWindowOpenHandler permits child windows. Apps that do not use offscreen rendering, or that deny child windows, are not affected.

Workarounds

Deny child window creation from offscreen renderers in your setWindowOpenHandler, or ensure child windows are closed before the parent is destroyed.

Fixed Versions
  • 41.0.0
  • 40.7.0
  • 39.8.1
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 39.8.1, 40.7.0 y 41.0.0, las aplicaciones que usan renderizado fuera de pantalla y permiten ventanas secundarias a través de window.open() pueden ser vulnerables a un uso después de liberación. Si el WebContents padre fuera de pantalla es destruido mientras una ventana secundaria permanece abierta, los subsiguientes fotogramas de pintura en la ventana secundaria desreferencian memoria liberada, lo que puede llevar a un fallo o corrupción de memoria. Las aplicaciones solo se ven afectadas si usan renderizado fuera de pantalla (webPreferences.offscreen: true) y su setWindowOpenHandler permite ventanas secundarias. Las aplicaciones que no usan renderizado fuera de pantalla, o que deniegan ventanas secundarias, no se ven afectadas. Este problema ha sido parcheado en las versiones 39.8.1, 40.7.0 y 41.0.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-34774 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-532v-xpq5-8h95 changed 2026-04-06CC-BY-4.0
NVDCVE-2026-34774 changed 2026-07-24Public domain