Update dependency systeminformation to v5.31.0 [SECURITY]#2317
Open
renovate[bot] wants to merge 1 commit intomei-dolphinfrom
Open
Update dependency systeminformation to v5.31.0 [SECURITY]#2317renovate[bot] wants to merge 1 commit intomei-dolphinfrom
renovate[bot] wants to merge 1 commit intomei-dolphinfrom
Conversation
5e99a91 to
7477f3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.27.14→5.31.0GitHub Vulnerability Alerts
CVE-2024-56334
Summary
The SSID is not sanitized when before it is passed as a parameter to cmd.exe in the
getWindowsIEEE8021xfunction. This means that malicious content in the SSID can be executed as OS commands.Details
I have exploited this vulnerability in a Windows service using version 5.22.11 of the module, to escalate privileges (in an environment where I am authorized to do so). However, as far as I can see from the code, it is still present in master branch at time of writing, on line 403/404 of network.js.
The SSID is obtained from
netsh wlan show interface ...ingetWindowsWirelessIfaceSSID, and then passed tocmd.exe /d /s /c "netsh wlan show profiles ...ingetWindowsIEEE8021x, without sanitization.PoC
First, the command injection payload should be included in the connected Wi-Fi SSID. For example create hotspot on mobile phone or other laptop, set SSID to payload, connect to it with victim Windows system. Two example SSID's to demonstrate exploitation are below.
Demonstration to run ping command indefinitely:
Run executable with privileges of the user in which vulnerable function is executed. Chosen executable should should be placed in (assuming system drive is C):
C:\a\a.exe.Then, the vulnerable function can be executed on the victim system, for example, using:
Now the chosen command,
PING.exeora.exewill be run through the cmd.exe command line.Impact
This vulnerability may enable an attacker, depending on how the package is used, to perform remote code execution or local privilege escalation.
CVE-2025-68154
Summary
The
fsSize()function insysteminformationis vulnerable to OS Command Injection (CWE-78) on Windows systems. The optionaldriveparameter is directly concatenated into a PowerShell command without sanitization, allowing arbitrary command execution when user-controlled input reaches this function.Affected Platforms: Windows only
CVSS Breakdown:
fsSize()Details
Vulnerable Code Location
File:
lib/filesystem.js, Line 197The
driveparameter is concatenated directly into the PowerShell command string without any sanitization.Why This Is a Vulnerability
This is inconsistent with the security pattern used elsewhere in the codebase. Other functions properly sanitize user input using
util.sanitizeShellString():lib/processes.jsservices()util.sanitizeShellString(srv)lib/processes.jsprocessLoad()util.sanitizeShellString(proc)lib/network.jsnetworkStats()util.sanitizeShellString(iface)lib/docker.jsdockerContainerStats()util.sanitizeShellString(containerIDs, true)lib/filesystem.jsfsSize()The
sanitizeShellString()function (defined atlib/util.js:731) removes dangerous characters like;,&,|,$,`,#, etc., which would prevent command injection.PoC
Attack Scenario
An application exposes disk information via an API and passes user input to
si.fsSize():Exploitation
Normal Request:
Malicious Request (Command Injection):
Command Construction Demonstration
The following demonstrates how commands are constructed with malicious input:
Normal usage:
With injection payload
C:; whoami #:PowerShell will execute:
Get-WmiObject Win32_logicaldisk | ... | where -property Caption -eq C:(original command)whoami(injected command)#is commented outPoC Script
PoC Output
As shown, the attacker's commands are injected directly into the PowerShell command string.
Impact
Who Is Affected?
systeminformationon Windows that pass user-controlled input tofsSize(drive)Potential Attack Scenarios
Recommended Fix
Apply
util.sanitizeShellString()to thedriveparameter, consistent with other functions in the codebase:if (_windows) { try { + const driveSanitized = drive ? util.sanitizeShellString(drive, true) : ''; - const cmd = `Get-WmiObject Win32_logicaldisk | select Access,Caption,FileSystem,FreeSpace,Size ${drive ? '| where -property Caption -eq ' + drive : ''} | fl`; + const cmd = `Get-WmiObject Win32_logicaldisk | select Access,Caption,FileSystem,FreeSpace,Size ${driveSanitized ? '| where -property Caption -eq ' + driveSanitized : ''} | fl`; util.powerShell(cmd).then((stdout, error) => {The
trueparameter enables strict mode which removes additional characters like spaces and parentheses.systeminformationthanks developers working on the project. The Systeminformation Project hopes this report helps improve the its security. Please systeminformation know if any additional information or clarification is needed.CVE-2026-26280
Summary
A command injection vulnerability in the
wifiNetworks()function allows an attacker to execute arbitrary OS commands via an unsanitized network interface parameter in the retry code path.Details
In
lib/wifi.js, thewifiNetworks()function sanitizes theifaceparameter on the initial call (line 437). However, when the initial scan returns empty results, asetTimeoutretry (lines 440-441) callsgetWifiNetworkListIw(iface)with the original unsanitizedifacevalue, which is passed directly toexecSync('iwlist ${iface} scan').PoC
systeminformation@5.30.7si.wifiNetworks('eth0; id')iwlist eth0; id scanImpact
Remote Code Execution (RCE). Any application passing user-controlled input to
si.wifiNetworks()is vulnerable to arbitrary command execution with the privileges of the Node.js process.CVE-2026-26318
Command Injection via Unsanitized
locateOutput inversions()— systeminformationPackage: systeminformation (npm)
Tested Version: 5.30.7
Affected Platform: Linux
Author: Sebastian Hildebrandt
Weekly Downloads: ~5,000,000+
Repository: https://github.com/sebhildebrandt/systeminformation
Severity: Medium
CWE: CWE-78 (OS Command Injection)
The Vulnerable Code Path
Inside the
versions()function, when detecting the PostgreSQL version on Linux, the code does this:Here's what happens step by step:
locate bin/postgresto search the filesystem for PostgreSQL binariesexec()call with+ ' -V'No
sanitizeShellString(). No path validation. NoexecFile(). Raw string concatenation intoexec().The
locatecommand reads from a system-wide database (plocate.dbormlocate.db) that indexes all filenames on the system. If any indexed filename contains shell metacharacters — specifically semicolons — those characters will be interpreted by the shell when passed toexec().Exploitation
Prerequisites
For this vulnerability to be exploitable, the following conditions must be met:
if (_linux)blocklocate/plocateis installed — common on Ubuntu, Debian, Fedora, RHELlocate bin/postgresreturns results (otherwise the code falls through to a safepsql -Vfallback)updatedbupdatedbruns daily via systemd timer (plocate-updatedb.timer) or cron on most distrosStep 1 — Verify the Environment
On the target machine, confirm locate is available and running:
Check who owns the locate database:
Database is root-owned and updated by root. Regular users cannot update it directly, but
updatedbruns on a daily schedule and indexes all readable files.Step 2 — Craft the Malicious File Path
The key insight is that Linux allows semicolons in filenames, and
exec()passes strings through/bin/sh -cwhich interprets semicolons as command separators.Create a file whose path contains an injected command:
Verify it exists:
This file needs to end up in the
locatedatabase. On a real system, this happens automatically whenupdatedbruns overnight. For testing purposes:Then verify locate picks it up:
Step 3 — Understand the Sort Trick
The vulnerable code sorts the locate results alphabetically and takes the last element:
Alphabetically,
/var/sorts after/usr/. So our malicious path naturally becomes the selected one:Quick verification:
Output:
Step 4 — Trigger the Vulnerability
Now when any application using systeminformation calls
versions()requesting the postgresql version, the injected command fires:Internally, the library builds and executes this command:
The shell (
/bin/sh -c) interprets this as three separate commands:Step 5 — Verify Code Execution
The file exists. Arbitrary command execution confirmed.
The injected command runs with whatever privileges the Node.js process has. In a monitoring dashboard or backend API context, that's typically the application service account.
Real-World Attack Scenarios
Scenario 1 — Shared Hosting / Multi-Tenant Server
A low-privileged user on a shared server creates the malicious file in
/tmpor their home directory. The hosting provider runs a monitoring agent that usessysteminformationfor health dashboards. Next time the agent callsversions(), the attacker's command executes under the monitoring agent's (higher-privileged) service account.Scenario 2 — CI/CD Pipeline Poisoning
A malicious contributor submits a PR that includes a build step creating files with crafted names. If the CI pipeline uses
systeminformationfor environment reporting (common in test harnesses and build dashboards), the injected commands execute in the CI runner context — potentially leaking secrets, tokens, and deployment keys.Scenario 3 — Container / Kubernetes Escape
In containerized environments where
/varor/tmpsits on a shared volume, a compromised container creates the malicious file. When the host-level monitoring agent (runningsysteminformation) callsversions(), the injected command executes on the host, breaking out of the container boundary.Suggested Fix
Replace
exec()withexecFile()for the PostgreSQL binary version check.execFile()does not spawn a shell, so metacharacters in the path are treated as literal characters:Additionally, the locate output should be validated against a safe path pattern before use:
Disclosure
Release Notes
sebhildebrandt/systeminformation (systeminformation)
v5.31.0Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.8...v5.31.0
v5.30.8Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.7...v5.30.8
v5.30.7Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.6...v5.30.7
v5.30.6Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.5...v5.30.6
v5.30.5Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.4...v5.30.5
v5.30.4Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.3...v5.30.4
v5.30.3Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.2...v5.30.3
v5.30.2Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.1...v5.30.2
v5.30.1Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.30.0...v5.30.1
v5.30.0Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.29.1...v5.30.0
v5.29.1Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.29.0...v5.29.1
v5.29.0Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.28.10...v5.29.0
v5.28.10Compare Source
v5.28.9Compare Source
v5.28.8Compare Source
v5.28.7Compare Source
v5.28.6Compare Source
v5.28.5Compare Source
v5.28.4Compare Source
v5.28.3Compare Source
v5.28.2Compare Source
v5.28.1Compare Source
v5.28.0Compare Source
v5.27.17Compare Source
v5.27.16Compare Source
v5.27.15Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.