A severe command-injection vulnerability has been discovered in systeminformation, a widely used Node.js library trusted by developers to retrieve system information.
The flaw, tracked as CVE-2025-68154, allows attackers to execute arbitrary commands on Windows systems when applications pass user input to the vulnerable function.
The vulnerability exists in the fsSize() function, which retrieves disk space information but fails to properly validate the optional drive parameter before passing it to PowerShell commands.
Sebastian Hildebrandt maintains the systeminformation package, one of the most popular Node.js system-monitoring libraries, with millions of downloads.
Technical Details of the Vulnerability
The vulnerability occurs in lib/filesystem.js at line 197, where the drive parameter is directly concatenated into a PowerShell command string without sanitization.
When an application accepts user input and passes it to fsSize(), attackers can inject arbitrary PowerShell commands.
The codebase already implements proper input sanitization through the util.
The sanitizeShellString() function is used elsewhere for similar operations. However, the fsSize() function failed to apply this same protection, representing a critical oversight in the security implementation.
The attack works by injecting semicolons and comment characters into the drive parameter. An attacker could supply a payload such as “C:; whoami #”, which executes the whoami command while commenting out the rest of the original command.
More sophisticated attacks could download ransomware, exfiltrate sensitive files, or establish persistent access on affected systems.
Sebastian Hildebrandt released version 5.27.14 on December 16, 2025, which patches the vulnerability. Developers must immediately update all instances of system information to version 5.27.14 or newer.
The fix applies the util.sanitizeShellString() function to the drive parameter before constructing the PowerShell command, removing dangerous characters including semicolons, pipes, and other special characters that enable command injection.
The CVSS score of 7.5 reflects the serious nature of the flaw, particularly given that it can be exploited at the library level with no user interaction or authentication required.
Any application that uses vulnerable versions and handles user input represents an active security risk.
Organizations using System Information should prioritize this update immediately. Security teams should conduct an inventory of all applications and services using the library and apply the patch without delay.
Given the widespread adoption of system information across enterprises and development environments, timely patching is critical to preventing potential exploitation.
Find this Story Interesting! Follow us on Google News, LinkedIn, and X to Get More Instant Updates.