{"id":"CVE-2021-39184","aliases":["CVE-2021-39184","GHSA-mpjm-v997-c4h4"],"related":[],"kind":"vulnerability","state":"published","title":"Sandboxed renderers can obtain thumbnails of arbitrary files through the nativeImage API","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThis 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.\n\nAll current stable versions of Electron are affected.\n\n### Patches\nThis was fixed with #30728, and the following Electron versions contain the fix:\n\n- 15.0.0-alpha.10\n- 14.0.0\n- 13.3.0\n- 12.1.0\n- 11.5.0\n\n### Workarounds\nIf your app enables `contextIsolation`, this vulnerability is significantly more difficult for an attacker to exploit.\n\nFurther, 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:\n```js\ndelete require('electron').nativeImage.createThumbnailFromPath\n```\n\n### For more information\nIf you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-10-12T19:05:11.000Z","modified":"2026-07-08T06:29:30.611Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-668","CWE-862"],"affected":[{"ranges":[{"version":"< 11.5.0","status":"affected"},{"version":">= 12.0.0, < 12.1.0","status":"affected"},{"version":">= 13.0.0, < 13.3.0","status":"affected"}],"vendor":"electron","product":"electron","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"11.5.0"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"12.0.0","status":"affected","fixed":"12.1.0"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"13.0.0","status":"affected","fixed":"13.3.0"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"10.1.0","fixed":"11.5.0"},{"status":"affected","introduced":"12.0.0","fixed":"12.1.0"},{"status":"affected","introduced":"13.0.0","fixed":"13.3.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"14.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"},{"status":"affected","version":"15.0.0"}],"vendor":"electronjs","product":"electron","cpe":"cpe:2.3:a:electronjs:electron:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/electron/electron/security/advisories/GHSA-mpjm-v997-c4h4","tags":["mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/electron/electron/pull/30728","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39184","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/electron/electron/pull/30728/commits/8fed645bd671f359ee52d806c075ec4e07eda17f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/electron/electron","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-39184","url":"https://www.cve.org/CVERecord?id=CVE-2021-39184","licence":"CVE Terms of Use","modified":"2024-08-04T01:58:18.275Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mpjm-v997-c4h4","url":"https://github.com/advisories/GHSA-mpjm-v997-c4h4","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:30.611Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-39184","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39184","licence":"Public domain","modified":"2026-06-17T04:03:16.130Z"}],"updatedAt":"2026-11-25T22:58:04.443Z","epss":{"score":0.0105,"percentile":0.65206,"date":"2026-12-01T12:00:22.000Z"}}