6.8medium
Sandboxed renderers can obtain thumbnails of arbitrary files through the nativeImage API
- Severity
- 6.8medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.05% (higher than 65% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mpjm-v997-c4h4
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
| Product or package | Versions | Reported by |
|---|---|---|
| electron electron | < 11.5.0, >= 12.0.0, < 12.1.0, >= 13.0.0, < 13.3.0 | CVE List |
| electron (npm) | before 11.5.0, from 12.0.0 before 12.1.0, from 13.0.0 before 13.3.0 | GitHub Advisory Database |
| electronjs 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, 15.0.0 | NVD |
All scores
| GitHub_M | 6.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N |
| GitHub | 6.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N |
| NVD | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
This vulnerability 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.
All current stable versions of Electron are affected.
Patches
This was fixed with #30728, and the following Electron versions contain the fix:
- 15.0.0-alpha.10
- 14.0.0
- 13.3.0
- 12.1.0
- 11.5.0
Workarounds
If your app enables contextIsolation, this vulnerability is significantly more difficult for an attacker to exploit.
Further, if your app does not depend on the createThumbnailFromPath API, then you can simply disable the functionality. In the main process, before the 'ready' event:
delete require('electron').nativeImage.createThumbnailFromPath
For more information
If you have any questions or comments about this advisory, email us at security@electronjs.org.
NVD (es)
Electron es un framework para escribir aplicaciones de escritorio multiplataforma usando JavaScript, HTML y CSS. Una vulnerabilidad en las versiones anteriores a 11.5.0, 12.1.0 y 13.3.0, permite que un renderizador en sandbox requiera una imagen "thumbnail" de un archivo arbitrario en el sistema del usuario. La miniatura puede incluir potencialmente partes significativas del archivo original, incluyendo datos textuales en muchos casos. Las versiones 15.0.0-alpha.10, 14.0.0, 13.3.0, 12.1.0 y 11.5.0, contienen una corrección de la vulnerabilidad. Se presentan dos soluciones disponibles aparte de la actualización. Uno puede hacer que la vulnerabilidad sea significativamente más difícil de explotar para un atacante al habilitar "contextIsolation" en la propia aplicación. También es posible deshabilitar la funcionalidad de la API "createThumbnailFromPath" si no es necesaria
References
| https://github.com/electron/electron/security/advisories/GHSA-mpjm-v997-c4h4 | mitigation, third-party-advisory, web | |
| https://github.com/electron/electron/pull/30728 | third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-39184 | advisory | |
| https://github.com/electron/electron/pull/30728/commits/8fed645bd671f359ee52d806c075ec4e07eda17f | web | |
| https://github.com/electron/electron | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-39184 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mpjm-v997-c4h4 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-39184 changed 2026-06-17 | Public domain |