Content-Secrity-Policy disabling eval not applied consistently in renderers with sandbox disabled in Electron (electron electron)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.66 % · percentile 52 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Modified
Description
Electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS. A Content-Security-Policy that disables eval, specifically setting a `script-src` directive and _not_ providing `unsafe-eval` in that directive, is not respected in renderers that have sandbox disabled. i.e. `sandbox: false` in the `webPreferences` object. This allows usage of methods like `eval()` and `new Function` unexpectedly which can result in an expanded attack surface. This issue only ever affected the 22 and 23 major versions of Electron and has been fixed in the latest versions of those release lines. Specifically, these versions contain the fixes: 22.0.1 and 23.0.0-alpha.2 We recommend all apps upgrade to the latest stable version of Electron. If upgrading isn't possible, this issue can be addressed without upgrading by enabling `sandbox: true` on all renderers.
Weaknesses (CWE)
- CWE-670 — Always-Incorrect Control Flow Implementation
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | GitHub_M |
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-gxh7-wv9q-fwfr — Electron's Content-Secrity-Policy disabling eval not applied consistently in renderers with sandbox disabled
European references
- ENISA EUVD · EUVD-2023-2513
- GCVE · GCVE-0-2023-23623
Affected configurations (NVD CPE)
cpe:2.3:a:electronjs:electron:22.0.0:-:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta1:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta2:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta3:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta4:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta5:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta6:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta7:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:22.0.0:beta8:*:*:*:node.js:*:*cpe:2.3:a:electronjs:electron:23.0.0:alpha1:*:*:*:node.js:*:*
Affected products
| Product | Versions |
|---|---|
| electron · electron | affected >= 22.0.0-beta.1, < 22.0.1 ; affected >= 23.0.0-alpha.1, < 23.0.0-alpha.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |