CVE-2026-34781: Electron crashes in clipboard.readImage() on malformed clipboard image data

Published Apr 7, 2026
·
Updated

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

Other sources

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.

MITRE

Affected Software

12 affected componentsFixes available
npm/electron>=42.0.0-alpha.1<42.0.0-alpha.5
42.0.0-alpha.5
npm/electron>=41.0.0-alpha.1<41.1.0
41.1.0
npm/electron>=40.0.0-alpha.1<40.8.5
40.8.5
npm/electron<39.8.5
39.8.5
electronjs Electron Node.js<=39.8.4
electronjs Electron Node.js>=40.0.0<=40.8.4
electronjs Electron Node.js>=41.0.0<41.1.0
electronjs Electron Node.js=41.2.0
electronjs Electron Node.js=42.0.0-alpha1
electronjs Electron Node.js=42.0.0-alpha2
electronjs Electron Node.js=42.0.0-alpha3
electronjs Electron Node.js=42.0.0-alpha4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 42.0.0-alpha.5
  2. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 41.1.0
  3. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 40.8.5
  4. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 39.8.5
  5. Upgrade

    Upgrade electron to a version that resolves this vulnerability.

    Fixed in 39.8.5
  6. Upgrade

    Upgrade electron to a version that resolves this vulnerability.

    Fixed in 40.8.5
  7. Upgrade

    Upgrade electron to a version that resolves this vulnerability.

    Fixed in 41.1.0
  8. Upgrade

    Upgrade electron to a version that resolves this vulnerability.

    Fixed in 42.0.0-alpha.5
  9. Configuration

    Validate that the clipboard contains image data via `clipboard.availableFormats()` before calling `clipboard.readImage()`.

    Electron app using clipboard API clipboard image validation before read = Use clipboard.availableFormats() to confirm image format exists before calling clipboard.readImage()

Event History

Apr 7, 2026
Advisory Published
via GitHub·03:52 PM
Data Sourced
via GitHub·03:52 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:20 PM
Data Sourced
via MITRE·09:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
Affected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203