GHSA-f37v-82c4-4x64 CVE-2026-34781
Electron: Crash in clipboard.readImage() on malformed clipboard image data
- Severity
- 2.8 / 10
- Low · CVSS 3.1
- Exploit chance (EPSS)
- 0.14%
- Chance of exploitation in the next 30 days. Higher than 3.67% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-476 NULL Pointer Dereference
- Fix
39.8.5- Upgrade electron to this version or later
Description
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.541.1.040.8.539.8.5
For more information
If you have any questions or comments about this advisory, email us at security@electronjs.org
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| electron | < 39.8.5 |
39.8.5 |
| electron | >= 40.0.0-alpha.1, < 40.8.5 |
40.8.5 |
| electron | >= 41.0.0-alpha.1, < 41.1.0 |
41.1.0 |
| electron | >= 42.0.0-alpha.1, < 42.0.0-alpha.5 |
42.0.0-alpha.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
electron npm → 39.8.5
- npm
npm install electron@39.8.5- yarn
yarn add electron@39.8.5- pnpm
pnpm add electron@39.8.5
Severity breakdown
CVSS 3.1 2.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Weakness
CWE-476: NULL Pointer Dereference
The product dereferences a pointer that it expects to be valid but is NULL.
How to prevent it
- Implementation: For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
- Requirements: Select a programming language that is not susceptible to these issues.
- Implementation: Check the results of all functions that return a value and verify that the value is non-null before acting upon it.
- Architecture and Design: Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
- Implementation: Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.
References
Advisories
Packages
Other links
- github.com/electron/electron/security/advisories/GHSA-f37v-82c4-4x64
- github.com/electron/electron/pull/50475
- github.com/electron/electron/commit/a48f03fb8d03933547281ddb2dbb6c6b9e705287
- github.com/electron/electron/releases/tag/v39.8.5
- github.com/electron/electron/releases/tag/v40.8.5
- github.com/electron/electron/releases/tag/v41.1.0
- github.com/electron/electron/releases/tag/v42.0.0-alpha.5
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-qqvq-6xgj-jw8g Electron affected by libvpx's heap buffer overflow in vp8 encoding | High Known exploited | Also affects electron |
| GHSA-j7hp-h8jx-5ppr libwebp: OOB write in BuildHuffmanTable | High Known exploited | Also affects electron |
| GHSA-995f-9x5r-2rcj Heap buffer overflow in GPU | Critical Known exploited | Also affects electron |
| GHSA-jr5w-w6x2-84p9 Electron: Mitigation for compromised eMudhra intermediate certificates | High | Also affects electron |
| GHSA-h3v5-h239-pg29 Electron: Off-screen rendering on macOS trusts GPU-supplied frame geometry | Low | Also affects electron |
| GHSA-3qxv-5xgr-q7w9 Electron: Frame subscription trusts GPU-supplied frame geometry | Low | Also affects electron |
| GHSA-997q-gvvc-jwmx Electron: openExternal permission requests can be attributed to the wrong origin | Medium | Also affects electron |
| GHSA-fw47-9c62-h3vw Electron: HID and USB permission checks can be attributed to the wrong origin | Medium | Also affects electron |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor