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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: High; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.46% (percentile 32, 2026-11-26)
- **CWE:** CWE-94
- **Aliases:** GHSA-7x97-j373-85x5
- **Published:** 2023-09-06T19:51:33.000Z
- **Modified:** 2026-09-10T03:49:57.866Z

## Who should check

- Projects that depend on npm package electron (\< 22.3.19)
- Anyone running 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

## 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 and fixed versions

- npm `electron`: affected \< 22.3.19; fixed 22.3.19, 23.3.13, 24.7.1, 25.5.0, 26.0.0-beta.13 (osv)
- 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 (cvelist)

## Mitigation

- Upgrade electron to one of 22.3.19, 23.3.13, 24.7.1, 25.5.0, 26.0.0-beta.13 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-39956. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-39956.md
Affected: electron < 22.3.19
Fixed in: 22.3.19, 23.3.13, 24.7.1, 25.5.0, 26.0.0-beta.13

Steps:
1. Search this machine and project for electron (npm), electron: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-39956 being exploited?

There is no confirmed exploitation: CVE-2023-39956 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.46% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-39956?

Medium: CVSS 6.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2023-39956?

electron \< 22.3.19.

### Is there a fix for CVE-2023-39956?

Yes. Fixed in 22.3.19, 23.3.13, 24.7.1, 25.5.0, 26.0.0-beta.13. Upgrade electron to one of 22.3.19, 23.3.13, 24.7.1, 25.5.0, 26.0.0-beta.13 (or later in the same release line).

### How do I check if I'm affected by CVE-2023-39956?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/electron/electron/security/advisories/GHSA-7x97-j373-85x5>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-39956>
- other: <https://github.com/electron/electron>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-39956>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-7x97-j373-85x5> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-39956> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-39956>
