CVE-2024-27303: App builder lib Electron-builder's NSIS Installer - Execute Vulnerability
HIGHCVE-2024-27303 is a HIGH (CVSS 7.3) electron-builder's nsis installer - execute vulnerability (CWE-426: Untrusted Search Path) affecting App builder lib libraries in the npm ecosystem. The issue involves electron-builder's nsis installer - execute arbitrary code on the target machine (windows only). Remediation is available by upgrading affected packages to version 24.13.2.
CVE-2024-27303 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-27303
To remediate this vulnerability, upgrade all affected App builder lib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install app-builder-lib@24.13.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls app-builder-lib
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-27303, inspect your project dependencies using npm:
npm ls app-builder-lib
Analyze the terminal output to locate any version of App builder lib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 24.13.2), your application is affected.
Note: The npm ls app-builder-lib command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-426: Untrusted Search Path, where the 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. In App builder lib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-27303 Affected App builder lib Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
app-builder-lib
|
npm |
< 24.13.2
|
24.13.2
|
References
Frequently Asked Questions
What is CVE-2024-27303?
Which App builder lib versions are affected?
What version fixes CVE-2024-27303?
Is app-builder-lib affected?
What is the CVSS score of CVE-2024-27303?
What CWE is associated with CVE-2024-27303?
How can I check npm dependencies for CVE-2024-27303?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r4pf-3v7r-hh55",
"modified" : "2024-03-06T21:36:08Z",
"published" : "2024-03-04T20:42:45Z",
"aliases" : [ "CVE-2024-27303" ],
"summary" : "electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only)",
"details" : "### Impact\nWindows-Only: 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.\n\n### Patches\nFixed in https://github.com/electron-userland/electron-builder/pull/8059\n\n### Workarounds\nNone, it 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.\n\n### References\nhttps://cwe.mitre.org/data/definitions/426.html\nhttps://cwe.mitre.org/data/definitions/427",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "app-builder-lib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "24.13.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/electron-userland/electron-builder/security/advisories/GHSA-r4pf-3v7r-hh55"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27303"
}, {
"type" : "WEB",
"url" : "https://github.com/electron-userland/electron-builder/pull/8059"
}, {
"type" : "WEB",
"url" : "https://github.com/electron-userland/electron-builder/commit/8f4acff3c2d45c1cb07779bb3fe79644408ee387"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/electron-userland/electron-builder"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-426", "CWE-427" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-04T20:42:45Z",
"nvd_published_at" : "2024-03-06T19:15:08Z"
}
}