Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1yNHBmLTN2N3ItaGg1Nc4AA5wC

electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only)

Impact

Windows-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.

Patches

Fixed in https://github.com/electron-userland/electron-builder/pull/8059

Workarounds

None, 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.

References

https://cwe.mitre.org/data/definitions/426.html
https://cwe.mitre.org/data/definitions/427

Permalink: https://github.com/advisories/GHSA-r4pf-3v7r-hh55
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yNHBmLTN2N3ItaGg1Nc4AA5wC
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 9 months ago
Updated: 9 months ago


CVSS Score: 7.3
CVSS vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Identifiers: GHSA-r4pf-3v7r-hh55, CVE-2024-27303
References: Repository: https://github.com/electron-userland/electron-builder
Blast Radius: 32.7

Affected Packages

npm:app-builder-lib
Dependent packages: 65
Dependent repositories: 29,768
Downloads: 1,485,534 last month
Affected Version Ranges: < 24.13.2
Fixed in: 24.13.2
All affected versions: 20.24.0, 20.24.2, 20.24.3, 20.24.4, 20.24.5, 20.25.0, 20.26.0, 20.26.1, 20.27.0, 20.27.1, 20.28.0, 20.28.1, 20.28.2, 20.28.3, 20.28.4, 20.29.0, 20.29.1, 20.30.0, 20.31.0, 20.31.1, 20.31.2, 20.31.3, 20.32.0, 20.32.1, 20.32.2, 20.33.0, 20.33.1, 20.33.2, 20.34.0, 20.35.0, 20.36.0, 20.36.1, 20.36.2, 20.37.0, 20.38.0, 20.38.1, 20.38.2, 20.38.3, 20.38.4, 20.38.5, 20.39.0, 20.40.0, 20.40.1, 20.40.2, 20.41.0, 20.42.0, 20.43.0, 20.44.0, 20.44.1, 20.44.2, 20.44.3, 20.44.4, 21.0.0, 21.0.1, 21.0.2, 21.0.3, 21.0.4, 21.0.5, 21.0.6, 21.0.7, 21.0.8, 21.0.9, 21.0.10, 21.0.11, 21.0.12, 21.0.13, 21.0.14, 21.0.15, 21.0.16, 21.1.0, 21.1.1, 21.1.2, 21.1.3, 21.1.4, 21.1.5, 21.1.6, 21.2.0, 22.0.0, 22.1.0, 22.2.0, 22.3.0, 22.3.1, 22.3.2, 22.3.3, 22.3.4, 22.3.5, 22.3.6, 22.4.0, 22.4.1, 22.5.0, 22.5.1, 22.6.0, 22.6.1, 22.7.0, 22.8.0, 22.8.1, 22.9.0, 22.9.1, 22.10.0, 22.10.1, 22.10.2, 22.10.3, 22.10.4, 22.10.5, 22.11.0, 22.11.1, 22.11.2, 22.11.3, 22.11.4, 22.11.5, 22.11.6, 22.11.7, 22.11.8, 22.11.9, 22.11.10, 22.11.11, 22.12.0, 22.12.1, 22.13.0, 22.13.1, 22.14.0, 22.14.1, 22.14.2, 22.14.3, 22.14.4, 22.14.5, 22.14.6, 22.14.7, 22.14.8, 22.14.9, 22.14.10, 22.14.11, 22.14.12, 22.14.13, 23.0.0, 23.0.1, 23.0.2, 23.0.3, 23.0.4, 23.0.6, 23.0.7, 23.0.8, 23.0.9, 23.1.0, 23.2.0, 23.3.0, 23.3.1, 23.3.2, 23.3.3, 23.4.0, 23.5.0, 23.5.1, 23.6.0, 24.0.0, 24.1.0, 24.1.1, 24.1.2, 24.1.3, 24.2.0, 24.2.1, 24.3.0, 24.4.0, 24.5.0, 24.5.1, 24.5.2, 24.6.0, 24.6.1, 24.6.2, 24.6.3, 24.6.4, 24.6.5, 24.7.0, 24.8.0, 24.8.1, 24.9.0, 24.9.1, 24.9.2, 24.9.3, 24.9.4, 24.10.0, 24.11.0, 24.12.0, 24.13.0, 24.13.1
All unaffected versions: 24.13.2, 24.13.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 25.0.4, 25.0.5, 25.0.6, 25.1.1, 25.1.2, 25.1.3, 25.1.4, 25.1.5, 25.1.6, 25.1.7, 25.1.8