CVE-2023-23623
Electron's Content-Secrity-Policy disabling eval not applied consistently in renderers with sandbox disabled
Overview
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.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-670
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| npm | electron | >=22.0.0-beta.1, <22.0.1>=23.0.0-alpha.1, <23.0.0-alpha.2 | 22.0.123.0.0-alpha.2 |
Open a package to see all its vulnerabilities.
Operating systems · 1 fix
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | nodejs-electron +2 | 22.3.6-1.1 | openSUSE-SU-2024:12869-1 |
References
- github.com https://github.com/electron/electron
- github.com https://github.com/electron/electron/commit/9e7fbc7021d8d716c43782249a552e55289c35db
- github.com https://github.com/electron/electron/pull/36667
- github.com https://github.com/electron/electron/pull/36668
- github.com https://github.com/electron/electron/releases/tag/v22.0.1
- github.com https://github.com/electron/electron/security/advisories/GHSA-gxh7-wv9q-fwfr
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-23623
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.