CVE-2026-34781
JSON

2.8low

Electron crashes in clipboard.readImage() on malformed clipboard image data

Severity
2.8low CVSS:3.1 by GitHub_M
Exploit likelihood
0.15% (higher than 4% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-f37v-82c4-4x64

Description

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, apps that call clipboard.readImage() may be vulnerable to a denial of service. If the system clipboard contains image data that fails to decode, the resulting null bitmap is passed unchecked to image construction, triggering a controlled abort and crashing the process. Apps are only affected if they call clipboard.readImage(). Apps that do not read images from the clipboard are not affected. This issue does not allow memory corruption or code execution. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.

Affected

Product or packageVersionsReported by
electron electron< 39.8.5, >= 40.0.0-alpha.1, < 40.8.5, >= 41.0.0-alpha.1, < 41.1.0, >= 42.0.0-alpha.1, < 42.0.0-alpha.5CVE List
electron (npm)before 39.8.5, from 40.0.0-alpha.1 before 40.8.5, from 41.0.0-alpha.1 before 41.1.0, from 42.0.0-alpha.1 before 42.0.0-alpha.5GitHub Advisory Database
electronjs electronup to 39.8.4, from 40.0.0 up to 40.8.4, from 41.0.0 before 41.1.0, 41.2.0, 42.0.0NVD

All scores

GitHub_M2.8low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
GitHub2.8low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
NVD3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

Classification

CWE-476

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

What each source says

CVE List

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, apps that call clipboard.readImage() may be vulnerable to a denial of service. If the system clipboard contains image data that fails to decode, the resulting null bitmap is passed unchecked to image construction, triggering a controlled abort and crashing the process. Apps are only affected if they call clipboard.readImage(). Apps that do not read images from the clipboard are not affected. This issue does not allow memory corruption or code execution. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.

GitHub Advisory Database
Impact

Apps that call clipboard.readImage() may be vulnerable to a denial of service. If the system clipboard contains image data that fails to decode, the resulting null bitmap is passed unchecked to image construction, triggering a controlled abort and crashing the process.

Apps are only affected if they call clipboard.readImage(). Apps that do not read images from the clipboard are not affected. This issue does not allow memory corruption or code execution.

Workarounds

Validate that the clipboard contains image data via clipboard.availableFormats() before calling clipboard.readImage(). Note this only narrows the window — upgrading to a fixed version is recommended.

Fixed Versions
  • 42.0.0-alpha.5
  • 41.1.0
  • 40.8.5
  • 39.8.5
For more information

If you have any questions or comments about this advisory, email us at security@electronjs.org

NVD (es)

Electron es un framework para escribir aplicaciones de escritorio multiplataforma usando JavaScript, HTML y CSS. Antes de 39.8.5, 40.8.5, 41.1.0 y 42.0.0-alpha.5, las aplicaciones que llaman a clipboard.readImage() pueden ser vulnerables a una denegación de servicio. Si el portapapeles del sistema contiene datos de imagen que no se decodifican, el mapa de bits nulo resultante se pasa sin verificar a la construcción de la imagen, lo que desencadena un aborto controlado y bloquea el proceso. Las aplicaciones solo se ven afectadas si llaman a clipboard.readImage(). Las aplicaciones que no leen imágenes del portapapeles no se ven afectadas. Este problema no permite la corrupción de memoria ni la ejecución de código. Esta vulnerabilidad está corregida en 39.8.5, 40.8.5, 41.1.0 y 42.0.0-alpha.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-34781 changed 2026-04-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-f37v-82c4-4x64 changed 2026-04-08CC-BY-4.0
NVDCVE-2026-34781 changed 2026-07-24Public domain