Skip to content

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

MediumCVSS 6.6 EPSS 0.49%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial

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.

Upgrade path

3 packages: 2 fixed.

PackageAffectedFixed inStatus
electronjs electron < 22.3.9; = 26.0.0-alpha1; = 26.0.0-alpha2; = 26.0.0-alpha3 +20 more 22.3.9, 23.3.13, 24.7.1, 25.5.0 Fixed
npm electron(npm) < 22.3.19; >= 23.0.0-alpha.1, < 23.3.13; >= 24.0.0-alpha.1, < 24.7.1; >= 25.0.0-alpha.1, < 25.5.0 +1 more 22.3.19, 23.3.13, 24.7.1, 25.5.0, 26.0.0-beta.13 Fixed
electron = < 22.3.19; = >= 23.0.0, < 23.3.13; = >= 24.0.0, < 24.7.1; = >= 25.0.0, < 25.4.1 +1 more No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm electron(npm) < 22.3.19 22.3.19
npm electron(npm) >= 23.0.0-alpha.1, < 23.3.13 23.3.13
npm electron(npm) >= 24.0.0-alpha.1, < 24.7.1 24.7.1
npm electron(npm) >= 25.0.0-alpha.1, < 25.5.0 25.5.0
npm electron(npm) >= 26.0.0-alpha.1, < 26.0.0-beta.13 26.0.0-beta.13
electron = < 22.3.19 No fix listed
electron = >= 23.0.0, < 23.3.13 No fix listed
electron = >= 24.0.0, < 24.7.1 No fix listed
electron = >= 25.0.0, < 25.4.1 No fix listed
electron = >= 26.0.0-beta.1, < 26.0.0-beta.13 No fix listed
electronjs electron < 22.3.9 22.3.9
electronjs electron >= 23.0.0, < 23.3.13 23.3.13
electronjs electron >= 24.0.0, < 24.7.1 24.7.1
electronjs electron >= 25.0.0, < 25.5.0 25.5.0
electronjs electron = 26.0.0-alpha1 No fix listed
electronjs electron = 26.0.0-alpha2 No fix listed
electronjs electron = 26.0.0-alpha3 No fix listed
electronjs electron = 26.0.0-alpha4 No fix listed
electronjs electron = 26.0.0-alpha5 No fix listed
electronjs electron = 26.0.0-alpha6 No fix listed
electronjs electron = 26.0.0-alpha7 No fix listed
electronjs electron = 26.0.0-alpha8 No fix listed
electronjs electron = 26.0.0-beta1 No fix listed
electronjs electron = 26.0.0-beta10 No fix listed
electronjs electron = 26.0.0-beta11 No fix listed
Show 9 more
ProductAffected versionsFixed in
electronjs electron = 26.0.0-beta12 No fix listed
electronjs electron = 26.0.0-beta2 No fix listed
electronjs electron = 26.0.0-beta3 No fix listed
electronjs electron = 26.0.0-beta4 No fix listed
electronjs electron = 26.0.0-beta5 No fix listed
electronjs electron = 26.0.0-beta6 No fix listed
electronjs electron = 26.0.0-beta7 No fix listed
electronjs electron = 26.0.0-beta8 No fix listed
electronjs electron = 26.0.0-beta9 No fix listed

References