Electron vulnerable to out-of-package code execution when launched with arbitrary cwdGHSA-7x97-j373-85x5
MEDIUMGHSA-7x97-j373-85x5 is a medium-severity (CVSS 6.1) Code Injection vulnerability in electron. A fix is available for electron — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-7x97-j373-85x5.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
electronnpmDescription
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 [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | electron | all versions | 22.3.19npm install electron@22.3.19 |
| 📦npm | electron | ≥ 23.0.0-alpha.1&&< 23.3.13 | 23.3.13npm install electron@23.3.13 |
| 📦npm | electron | ≥ 24.0.0-alpha.1&&< 24.7.1 | 24.7.1npm install electron@24.7.1 |
| 📦npm | electron | ≥ 25.0.0-alpha.1&&< 25.5.0 | 25.5.0npm install electron@25.5.0 |
| 📦npm | electron | ≥ 26.0.0-alpha.1&&< 26.0.0-beta.13 | 26.0.0-beta.13npm install electron@26.0.0-beta.13 |
Affected Products
electronelectronjsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for electron, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update electron to 22.3.19 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7x97-j373-85x5 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is GHSA-7x97-j373-85x5 in your dependencies?
Find it across npm, including transitive dependencies.