CVE-2023-23623 Content-Secrity-Policy disabling eval not applied consistently in renderers with sandbox disabled in Electron
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: total
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.
Upgrade path
4 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| atom electron | >= 22.0.0_beta.1, < 22.0.1; >= 23.0.0_alpha.1, < 23.0.0_alpha.2 | 22.0.1, 23.0.0_alpha.2 | Fixed |
| npm electron(npm) | >= 22.0.0-beta.1, < 22.0.1; >= 23.0.0-alpha.1, < 23.0.0-alpha.2 | 22.0.1, 23.0.0-alpha.2 | Fixed |
| electron | = >= 22.0.0-beta.1, < 22.0.1; = >= 23.0.0-alpha.1, < 23.0.0-alpha.2 | No fix listed | Versions listed |
| electronjs electron | = 22.0.0; = 22.0.0-beta1; = 22.0.0-beta2; = 22.0.0-beta3 +6 more | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm electron(npm) | >= 22.0.0-beta.1, < 22.0.1 | 22.0.1 |
| npm electron(npm) | >= 23.0.0-alpha.1, < 23.0.0-alpha.2 | 23.0.0-alpha.2 |
| electron | = >= 22.0.0-beta.1, < 22.0.1 | No fix listed |
| electron | = >= 23.0.0-alpha.1, < 23.0.0-alpha.2 | No fix listed |
| atom electron | >= 22.0.0_beta.1, < 22.0.1 | 22.0.1 |
| atom electron | >= 23.0.0_alpha.1, < 23.0.0_alpha.2 | 23.0.0_alpha.2 |
| electronjs electron | = 22.0.0 | No fix listed |
| electronjs electron | = 22.0.0-beta1 | No fix listed |
| electronjs electron | = 22.0.0-beta2 | No fix listed |
| electronjs electron | = 22.0.0-beta3 | No fix listed |
| electronjs electron | = 22.0.0-beta4 | No fix listed |
| electronjs electron | = 22.0.0-beta5 | No fix listed |
| electronjs electron | = 22.0.0-beta6 | No fix listed |
| electronjs electron | = 22.0.0-beta7 | No fix listed |
| electronjs electron | = 22.0.0-beta8 | No fix listed |
| electronjs electron | = 23.0.0-alpha1 | No fix listed |
References
- https://github.com/electron/electron/security/advisories/GHSA-gxh7-wv9q-fwfr mitigation vendor-advisory
- github.com patch
- github.com patch
- github.com patch
- github.com
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product