CVE-2026-34764
Use-After-Free in Electron Offscreen Rendering with Shared Textures
Publication date: 2026-04-06
Last updated on: 2026-05-01
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| electronjs | electron | 42.0.0 |
| electronjs | electron | 42.0.0 |
| electronjs | electron | 42.0.0 |
| electronjs | electron | 42.0.0 |
| electronjs | electron | From 41.0.0 (inc) to 41.1.0 (exc) |
| electronjs | electron | From 33.0.0 (inc) to 39.8.5 (exc) |
| electronjs | electron | From 40.0.0 (inc) to 40.8.5 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-416 | The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-34764 is a use-after-free vulnerability in the Electron framework that affects applications using offscreen rendering with GPU shared textures.
The issue occurs in the release() callback of offscreen shared textures during paint events. Under certain conditions, this callback can outlive the backing native state of the texture, causing it to dereference freed memory in the main process.
This can lead to application crashes or memory corruption. Only applications that enable offscreen rendering with the option webPreferences.offscreen: { useSharedTexture: true } are affected.
The vulnerability is fixed in Electron versions 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.
How can this vulnerability impact me? :
This vulnerability can cause your Electron-based application to crash or experience memory corruption due to accessing freed memory.
Such instability can lead to denial of service or unexpected behavior in your application.
However, it does not impact confidentiality or integrity, as the vulnerability does not allow unauthorized data access or modification.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability affects Electron applications that use offscreen rendering with GPU shared textures enabled via webPreferences.offscreen: { useSharedTexture: true }.
Detection involves verifying the Electron version in use and whether the application enables shared-texture offscreen rendering.
You can check the Electron version by running the following command in the environment where the application runs:
- electron --version
To detect if the application uses offscreen rendering with shared textures, review the application's source code or configuration for the setting:
- webPreferences.offscreen: { useSharedTexture: true }
Since this is a use-after-free vulnerability causing crashes or memory corruption, monitoring application logs for crashes or abnormal behavior related to GPU textures may also help detect exploitation.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, ensure that the Electron application is updated to a patched version where the issue is fixed.
- Upgrade Electron to version 39.8.5, 40.8.5, 41.1.0, or 42.0.0-alpha.5 or later.
If upgrading is not immediately possible, ensure that the application calls texture.release() promptly after the texture has been consumed and before the texture object becomes unreachable.
- Review and modify application code to call texture.release() correctly to prevent the release() callback from accessing freed memory.
Additionally, consider disabling offscreen rendering with shared textures if it is not required by the application.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.