CVE-2024-27303: electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only)
Vulnerability summary
CVE-2024-27303 is a high (CVSS 7.3) Untrusted Search Path vulnerability in electron-userland electron-builder. EPSS estimates a 0.28% chance of exploitation in the next 30 days, higher than 22.1% of scored vulnerabilities.
Not severe (CVSS 7.3, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 06-03-2024PublishedVulnerability first disclosed.
- 13-08-2024Last modifiedVulnerability information updated.
Description
electron-builder is a solution to package and build a ready for distribution Electron, Proton Native app for macOS, Windows and Linux. A vulnerability that only affects eletron-builder prior to 24.13.2 in Windows, the NSIS installer makes a system call to open cmd.exe via NSExec in the `.nsh` installer script. NSExec by default searches the current directory of where the installer is located before searching `PATH`. This means that if an attacker can place a malicious executable file named cmd.exe in the same folder as the installer, the installer will run the malicious file. Version 24.13.2 fixes this issue. No known workaround exists. The code executes at the installer-level before the app is present on the system, so there's no way to check if it exists in a current installer.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · NpmEcosystem advisory · calculated7.3HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- NVDNIST7.3HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.28%
Chance of exploitation in the next 30 days
Percentile
22%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.28% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-426Untrusted Search PathThe product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.
- CWE-427Uncontrolled Search Path ElementThe product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.
Affected systems
Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Electron1 product
- electron-builder< 24.13.2
Electron-userland1 product
- electron-builder< 24.13.2
Npm1 product
- app-builder-lib< 24.13.2
Opensuse1 product
- teleport&distro=openSUSE Tumbleweed< 15.1.6-1.1
4 vendors · 4 products
References
6 links- github.com/electron-userland/electron-builder/security/advisories/GHSA-r4pf-3v7r-hh55X Refsource CONFIRMWEBVendor Advisory
- github.com/electron-userland/electron-builder/commit/8f4acff3c2d45c1cb07779bb3fe79644408ee387X Refsource MISCWEBPatch