CVE-2023-39956: Electron: Out-of-package code execution when launched with arbitrary cwd

Published Sep 6, 2023
·
Updated

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.13 25.5.0 24.7.1 23.3.13 22.3.19

For more information If you have any questions or comments about this advisory, email us at security@electronjs.org

Other sources

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.

Electron: CVE-2023-39956 -Visual Studio Code Remote Code Execution Vulnerability

Microsoft

Affected Software

30 affected componentsFixes available
npm/electron>=26.0.0-alpha.1<26.0.0-beta.13
26.0.0-beta.13
npm/electron>=25.0.0-alpha.1<25.5.0
25.5.0
npm/electron>=24.0.0-alpha.1<24.7.1
24.7.1
npm/electron>=23.0.0-alpha.1<23.3.13
23.3.13
npm/electron<22.3.19
22.3.19
electronjs Electron Node.js<22.3.9
electronjs Electron Node.js>=23.0.0<23.3.13
electronjs Electron Node.js>=24.0.0<24.7.1
electronjs Electron Node.js>=25.0.0<25.5.0
electronjs Electron Node.js=26.0.0-alpha1
electronjs Electron Node.js=26.0.0-alpha2
electronjs Electron Node.js=26.0.0-alpha3
electronjs Electron Node.js=26.0.0-alpha4
electronjs Electron Node.js=26.0.0-alpha5
electronjs Electron Node.js=26.0.0-alpha6
electronjs Electron Node.js=26.0.0-alpha7
electronjs Electron Node.js=26.0.0-alpha8
electronjs Electron Node.js=26.0.0-beta1
electronjs Electron Node.js=26.0.0-beta10
electronjs Electron Node.js=26.0.0-beta11
electronjs Electron Node.js=26.0.0-beta12
electronjs Electron Node.js=26.0.0-beta2
electronjs Electron Node.js=26.0.0-beta3
electronjs Electron Node.js=26.0.0-beta4
electronjs Electron Node.js=26.0.0-beta5
electronjs Electron Node.js=26.0.0-beta6
electronjs Electron Node.js=26.0.0-beta7
electronjs Electron Node.js=26.0.0-beta8
electronjs Electron Node.js=26.0.0-beta9
Microsoft Visual Studio Code

Event History

Sep 6, 2023
Advisory Published
07:51 PM
CVE Published
via MITRE·08:09 PM
Data Sourced
via MITRE·08:09 PM
DescriptionSeverityWeakness
Sep 12, 2023
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-39956?

CVE-2023-39956 is a Visual Studio Code Remote Code Execution Vulnerability in Electron.

2

How does CVE-2023-39956 impact apps?

Apps that are launched as command line executables are impacted.

3

What are the conditions for CVE-2023-39956 to be exploited?

This vulnerability can only be exploited if the app is launched with an attacker-controlled working directory.

4

How do I fix CVE-2023-39956?

You can fix CVE-2023-39956 by updating Electron to version 26.0.0-beta.13 or higher.

5

What is the severity of CVE-2023-39956?

CVE-2023-39956 has a severity score of 6.1 (high).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203