What’s Vulnerable › Vulnerabilities
CVE-2021-39184: Sandboxed renderers can obtain thumbnails of arbitrary files through the nativeImage API
- Severity: high (CVSS 8.6 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-10-12 · updated 2026-06-17
- Weakness: CWE-668
Description
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. A vulnerability in versions prior to 11.5.0, 12.1.0, and 13.3.0 allows a sandboxed renderer to request a "thumbnail" image of an arbitrary file on the user's system. The thumbnail can potentially include significant parts of the original file, including textual data in many cases. Versions 15.0.0-alpha.10, 14.0.0, 13.3.0, 12.1.0, and 11.5.0 all contain a fix for the vulnerability. Two workarounds aside from upgrading are available. One may make the vulnerability significantly more difficult for an attacker to exploit by enabling `contextIsolation` in one's app. One may also disable the functionality of the `createThumbnailFromPath` API if one does not need it.
Affected products
- electron: from 10.1.0 before 11.5.0; from 12.0.0 before 12.1.0; from 13.0.0 before 13.3.0; 14.0.0-beta1, 14.0.0-beta10, 14.0.0-beta11, 14.0.0-beta12, 14.0.0-beta13, 14.0.0-beta14 (+28) — fixed in 11.5.0, 12.1.0, 13.3.0
How to fix
Upgrade to a fixed version: electron 11.5.0, 12.1.0, 13.3.0. Check the vendor advisory for mitigations.
References
- https://github.com/electron/electron/pull/30728
- https://github.com/electron/electron/security/advisories/GHSA-mpjm-v997-c4h4
- https://github.com/electron/electron/pull/30728
- https://github.com/electron/electron/security/advisories/GHSA-mpjm-v997-c4h4
Get alerted when CVE-2021-39184 or the next vulnerability affects your stack