{"id":"CVE-2024-27303","published":"2024-03-06T18:35:37Z","modified":"2024-08-13T17:12:24Z","title":"electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only)","vendor":"electron-userland","product":"electron-builder","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00412,"percentile":0.26999,"provenance":"source"},"cwes":[{"id":"CWE-426","name":"Untrusted Search Path"},{"id":"CWE-427","name":"Uncontrolled Search Path Element"}],"references":[{"url":"https://github.com/electron-userland/electron-builder/security/advisories/GHSA-r4pf-3v7r-hh55","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/electron-userland/electron-builder/pull/8059","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron-userland/electron-builder/commit/8f4acff3c2d45c1cb07779bb3fe79644408ee387","tags":["x_refsource_MISC"]}],"priority":{"score":10.5,"factors":[{"name":"EPSS percentile","points":5.4},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"electron-userland","affectedVersions":[{"vendor":"electron-userland","product":"electron-builder","versions":["< 24.13.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-03-07T20:09:00.747801Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"app-builder-lib","vulnerableRanges":["<24.13.2"],"patched":["24.13.2"],"from":["GHSA-r4pf-3v7r-hh55"],"provenance":"source"}],"summary":{"text":"The electron-builder NSIS installer for Windows, in versions prior to 24.13.2, runs a system call to cmd.exe via NSExec in its .nsh installer script, and NSExec searches the installer's current directory before PATH, so it can load an attacker-supplied cmd.exe. An attacker with local access who can place a malicious cmd.exe in the same folder as the installer can get arbitrary code executed on the target machine, which requires a user to run the installer.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:45Z"},"euvd":{"id":"EUVD-2024-0997","exploited":false,"provenance":"source"}}