Critical Node.js Library Flaw Lets Hackers Execute Remote Commands on Windows
A critical command injection vulnerability has been identified in the systeminformation library, a widely-utilized Node.js library for system data retrieval.
A critical command injection vulnerability has been identified in the systeminformation library, a widely-utilized Node.js library for system data retrieval.
Identified as CVE-2025-68154, the vulnerability allows the execution of arbitrary commands on Windows systems when user input is directed to the vulnerable function.
The vulnerability is located in the fsSize() function, which retrieves disk space details but inadequately validates the optional drive parameter before incorporating it into PowerShell commands. The flaw arises in lib/filesystem.js at line 197, where the drive parameter is directly concatenated into a PowerShell command string without proper sanitization.
This oversight enables attackers to inject arbitrary PowerShell commands through user input. Although the codebase includes input sanitization via the util.sanitizeShellString() function, this protection was not applied within the fsSize() function.
This oversight enables attackers to inject arbitrary PowerShell commands through user input.
Attackers can exploit this by injecting semicolons and comment characters into the drive parameter, enabling command execution. For instance, a payload such as "C:; whoami #" would execute the whoami command while neutralizing the remainder of the original command.
Version 5.27.14, released on Thu, Dec 16, 2025, addresses this vulnerability by implementing the util.sanitizeShellString() function to the drive parameter, thereby neutralizing harmful characters. It is imperative for developers to update all instances of the systeminformation library to version 5.27.14 or later.
The CVSS score of 7.5 highlights the severity of the vulnerability, as it can be exploited without user interaction or authentication. Applications using vulnerable versions of the library that process user input pose a significant security risk.
Based on reporting by GBHackers.
