CVE-2024-27303: electron-builder NSIS installer arbitrary code execution

CVE-2024-27303 · Severity: low · CVSS 3.1 · Published 2024-03-04

electron-builder is a build tool used to package Electron applications into installers for Windows. The NSIS installer component searches the current directory for executables before checking the system PATH, allowing an attacker who can place a malicious cmd.exe file in the installer's directory to execute arbitrary code during installation. An attacker could gain full control over a Windows system during the application installation process.

Technologies: Electron Userland Electron-Builder. Vendors: Electron Userland.

Quick answers

Is CVE-2024-27303 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-27303 being exploited in the wild.
How severe is CVE-2024-27303?
Low severity, with a CVSS score of 3.1, published 4 March 2024.
Which products and versions are affected?
Electron Userland Electron-Builder < 24.13.2.
Is there a fix for CVE-2024-27303?
A patch was published on 2024-03-04: Fixed in app-builder-lib 24.13.2 via PR #8059 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-27303 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2024-27303?
Check whether you run Electron Userland Electron-Builder at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a DLL/executable search path hijacking issue (CWE-426, CWE-427) in electron-builder's NSIS installer script. The NSIS NSExec function, called by the .nsh installer script, executes cmd.exe but searches the current directory (where the installer binary is located) before searching the system PATH. An attacker with the ability to place a file in the same directory as the installer can substitute a malicious cmd.exe that will be executed with the privileges of the installer process. The attack requires local access and user interaction (running the installer), but results in arbitrary code execution with high impact to confidentiality, integrity, and availability. The vulnerability has been patched in app-builder-lib version 24.13.2 and later.

Affected products

  • electron-userland electron-builder < 24.13.2

Identifiers

  • CVE-2024-27303
  • GHSA-r4pf-3v7r-hh55

Timeline

  • 2024-03-04: disclosed: Security advisory GHSA-r4pf-3v7r-hh55 published
  • 2024-03-04: patched: Fixed in app-builder-lib 24.13.2 via PR #8059

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.