6.1medium
Electron: Out-of-package code execution when launched with arbitrary cwd
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.49% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7x97-j373-85x5
Description
Electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS. Electron apps that are launched as command line executables are impacted. Specifically this issue can only be exploited if the following conditions are met: 1. The app is launched with an attacker-controlled working directory and 2. The attacker has the ability to write files to that working directory. This makes the risk quite low, in fact normally issues of this kind are considered outside of our threat model as similar to Chromium we exclude Physically Local Attacks but given the ability for this issue to bypass certain protections like ASAR Integrity it is being treated with higher importance. This issue has been fixed in versions:`26.0.0-beta.13`, `25.4.1`, `24.7.1`, `23.3.13`, and `22.3.19`. There are no app side workarounds, users must update to a patched version of Electron.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| electron electron | < 22.3.19, >= 23.0.0, < 23.3.13, >= 24.0.0, < 24.7.1, >= 25.0.0, < 25.4.1, >= 26.0.0-beta.1, < 26.0.0-beta.13 | CVE List |
| electron (npm) | before 22.3.19, from 23.0.0-alpha.1 before 23.3.13, from 24.0.0-alpha.1 before 24.7.1, from 25.0.0-alpha.1 before 25.5.0, from 26.0.0-alpha.1 before 26.0.0-beta.13 | GitHub Advisory Database |
| electronjs electron | before 22.3.9, from 23.0.0 before 23.3.13, from 24.0.0 before 24.7.1, from 25.0.0 before 25.5.0, 26.0.0 | NVD |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L |
| NVD | 6.6medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS. Electron apps that are launched as command line executables are impacted. Specifically this issue can only be exploited if the following conditions are met: 1. The app is launched with an attacker-controlled working directory and 2. The attacker has the ability to write files to that working directory. This makes the risk quite low, in fact normally issues of this kind are considered outside of our threat model as similar to Chromium we exclude Physically Local Attacks but given the ability for this issue to bypass certain protections like ASAR Integrity it is being treated with higher importance. This issue has been fixed in versions:`26.0.0-beta.13`, `25.4.1`, `24.7.1`, `23.3.13`, and `22.3.19`. There are no app side workarounds, users must update to a patched version of Electron.
GitHub Advisory Database
Impact
Apps that are launched as command line executables are impacted. E.g. if your app exposes itself in the path as myapp --help
Specifically this issue can only be exploited if the following conditions are met:
- Your app is launched with an attacker-controlled working directory
- The attacker has the ability to write files to that working directory
This makes the risk quite low, in fact normally issues of this kind are considered outside of our threat model as similar to Chromium we exclude Physically Local Attacks but given the ability for this issue to bypass certain protections like ASAR Integrity it is being treated with higher importance. Please bear this in mind when reporting similar issues in the future.
Workarounds
There are no app side workarounds, you must update to a patched version of Electron.
Fixed Versions
26.0.0-beta.1325.5.024.7.123.3.1322.3.19
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 que le permite escribir aplicaciones de escritorio multiplataforma utilizando JavaScript, HTML y CSS. Las aplicaciones de Electron que se inician como ejecutables de línea de comandos se ven afectadas. Específicamente, este problema solo puede explotarse si se cumplen las siguientes condiciones: 1. La aplicación se inicia con un directorio de trabajo controlado por el atacante y 2. El atacante tiene la capacidad de escribir archivos en ese directorio de trabajo. Esto hace que el riesgo sea bastante bajo, de hecho, normalmente los problemas de este tipo se consideran fuera de nuestro modelo de amenaza, ya que son similares a Chromium y excluimos los ataques físicamente locales, pero dada la capacidad de este problema para eludir ciertas protecciones como la Integridad ASAR, se está tratando con niveles más altos de importancia. Este problema se solucionó en las versiones: `26.0.0-beta.13`, `25.4.1`, `24.7.1`, `23.3.13` y `22.3.19`. No existen workarounds en la aplicación, los usuarios deben actualizar a una versión parcheada de Electron."
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-39956 changed 2024-09-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7x97-j373-85x5 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-39956 changed 2026-06-17 | Public domain |