Electron: Crash in clipboard.readImage() on malformed clipboard image data
Published 7 Apr 2026 · Updated 8 Apr 2026
Affected packages
- Affected
- <39.8.5
- Fixed in
- 39.8.5
npm install electron@39.8.5- Affected
- >=40.0.0-alpha.1 <40.8.5
- Fixed in
- 40.8.5
npm install electron@40.8.5- Affected
- >=41.0.0-alpha.1 <41.1.0
- Fixed in
- 41.1.0
npm install electron@41.1.0- Affected
- >=42.0.0-alpha.1 <42.0.0-alpha.5
- Fixed in
- 42.0.0-alpha.5
npm install electron@42.0.0-alpha.5Details
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](mailto:security@electronjs.org)
Is GHSA-f37v-82c4-4x64 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected electron, and gives you the command that fixes it.
References
- Linkgithub.com/electron/electron/security/advisories/GHSA-f37v-82c4-4x64
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-34781
- Linkgithub.com/electron/electron/pull/50475
- Linkgithub.com/electron/electron/commit/a48f03fb8d03933547281ddb2dbb6c6b9e705287
- Packagegithub.com/electron/electron
- Linkgithub.com/electron/electron/releases/tag/v39.8.5
- Linkgithub.com/electron/electron/releases/tag/v40.8.5
- Linkgithub.com/electron/electron/releases/tag/v41.1.0
- Linkgithub.com/electron/electron/releases/tag/v42.0.0-alpha.5
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.