Use After Free Affecting electron package, versions >=33.0.0-alpha.1 <39.8.5>=40.0.0-alpha.2 <40.8.5>=41.0.0-alpha.1 <41.1.0>=42.0.0-alpha.1 <42.0.0-alpha.5


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-ELECTRON-15907847
  • published5 Apr 2026
  • disclosed3 Apr 2026
  • creditdaffainfo

Introduced: 3 Apr 2026

NewCVE-2026-34764  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade electron to version 39.8.5, 40.8.5, 41.1.0, 42.0.0-alpha.5 or higher.

Overview

electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

Affected versions of this package are vulnerable to Use After Free in the release callback of the paint event, when offscreen rendering with GPU shared textures is enabled. An attacker can cause a crash or memory corruption by invoking the callback after its backing native state has been freed.

Note: This is only exploitable if offscreen rendering is used with webPreferences.offscreen: { useSharedTexture: true } enabled.

Workaround

This vulnerability can be mitigated by ensuring texture.release() is called promptly after the texture has been consumed, before the texture object becomes unreachable.

CVSS Base Scores

version 4.0
version 3.1