CVE-2024-27303: Vulnerability in electron-builder's NSIS installer

app-builder-lib Updated 02 Oct 2025

Summary

04/03/2024
Yes i
High
7.3

CVE-2024-27303: electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only). Affects app-builder-lib versions < 24.13.2. Fixed in 24.13.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The electron-builder package is an open-source tool used for building and packaging Electron applications. It provides a set of APIs and utilities to create installers for different platforms. One of the supported installers is the NSIS installer, which is primarily used for Windows applications. The NSIS installer script in electron-builder makes a system call to open cmd.exe via NSExec. However, this functionality can be exploited by an attacker to execute arbitrary code on the target machine.

Vulnerability Detail

The vulnerability lies in the way NSExec in the NSIS installer script searches for the cmd.exe executable. By default, NSExec searches the current directory of the installer before searching the system's 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 unknowingly execute the malicious file. This vulnerability is specific to Windows systems. If successfully exploited, an attacker can run arbitrary code with the privileges of the installer, potentially leading to further compromise of the target machine.

How To Fix

Latest published version: 26.15.3 as of 22 Oct 2026

npm install app-builder-lib@26.15.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

24.13.2

This is the first release that contains the fix.

npm install app-builder-lib@24.13.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Unfortunately, there is no known workaround for this vulnerability. Since the NSIS installer executes at the installer-level before the application is present on the system, there is no way to check if the malicious file exists in the current installer.

Conclusion

The vulnerability in electron-builder's NSIS installer allows an attacker to execute arbitrary code on a Windows machine during the installation process. It has been fixed in version 24.13.2 of the app-builder-lib package. Developers should update their dependencies to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for app-builder-lib →

Share this vulnerability

FAQ

Electron-builder is an open-source tool used for building and packaging Electron applications. It provides a set of APIs and utilities to create installers for different platforms.

The NSIS installer is one of the supported installers in electron-builder. It is primarily used for creating installers for Windows applications.

The vulnerability occurs because the NSIS installer script in electron-builder searches for the cmd.exe executable in the current directory of the installer before searching the system's PATH. This allows an attacker to place a malicious cmd.exe file in the same folder as the installer and have it executed during the installation process.

If successfully exploited, an attacker can execute arbitrary code on the target machine with the privileges of the installer. This can lead to further compromise of the system and unauthorized access to sensitive information.

Yes, the vulnerability has been fixed in version 24.13.2 of the app-builder-lib package. Developers should update their app-builder-lib dependency to at least this version to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for app-builder-lib.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 26.15.3 as of 22 Oct 2026

npm install app-builder-lib@26.15.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

24.13.2

This is the first release that contains the fix.

npm install app-builder-lib@24.13.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback