Security Vulnerability Report
中文
CVE-2026-34781 CVSS 2.8 LOW

CVE-2026-34781

Published: 2026-04-07 22:16:23
Last Modified: 2026-04-16 19:34:04

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.

CVSS Details

CVSS Score
2.8
Severity
LOW
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/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:41.2.0:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:electronjs:electron:42.0.0:alpha1:*:*:*:node.js:*:* - VULNERABLE
Electron < 39.8.5
Electron < 40.8.5
Electron < 41.1.0
Electron < 42.0.0-alpha.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-34781 // This PoC demonstrates the vulnerable call flow. // To reproduce: 1. Place malformed image data in system clipboard. // 2. Run this code in an Electron app context. const { clipboard } = require('electron'); try { console.log('Attempting to read image from clipboard...'); // Trigger the vulnerability by reading the clipboard. // If the clipboard contains malformed image data that fails to decode, // the process will crash due to the unchecked null bitmap. const image = clipboard.readImage(); if (image.isEmpty()) { console.log('Image is empty or invalid.'); } else { console.log('Image read successfully. Size: ' + image.getSize()); } } catch (e) { console.error('Exception occurred:', e); } // Note: Actual exploitation requires preparing specific malformed // bytes in the clipboard using OS-specific APIs or tools.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34781", "sourceIdentifier": "[email protected]", "published": "2026-04-07T22:16:23.123", "lastModified": "2026-04-16T19:34:03.983", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L", "baseScore": 2.8, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.3, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L", "baseScore": 3.3, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "39.8.4", "matchCriteriaId": "239C939D-31F6-414C-AF8A-385ADA0F2A17"}, {"vulnerable": true, "criteria": "cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "40.0.0", "versionEndIncluding": "40.8.4", "matchCriteriaId": "8190FCCE-AFCA-4D8C-BF8B-C8A3996B0D9D"}, {"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:41.2.0:*:*:*:*:node.js:*:*", "matchCriteriaId": "AE2BDFE9-435B-4E7A-9785-0805EE1AED4E"}, {"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-f37v-82c4-4x64", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}