Update dependency systeminformation to v5.31.6 [SECURITY]#2317
Open
renovate[bot] wants to merge 1 commit into
Open
Update dependency systeminformation to v5.31.6 [SECURITY]#2317renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
5e99a91 to
7477f3d
Compare
7477f3d to
b245919
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.6Systeminformation has command injection vulnerability in getWindowsIEEE8021x (SSID)
CVE-2024-56334 / GHSA-cvv5-9h9w-qp2m
More information
Details
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.
Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
systeminformation has a Command Injection vulnerability in fsSize() function on Windows
CVE-2025-68154 / GHSA-wphj-fx3q-84ch
More information
Details
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.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Systeminformation has a Command Injection via unsanitized interface parameter in wifi.js retry path
CVE-2026-26280 / GHSA-9c88-49p5-5ggf
More information
Details
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.Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Command Injection via Unsanitized
locateOutput inversions()— systeminformationCVE-2026-26318 / GHSA-5vv4-hvf7-2h46
More information
Details
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
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Systeminformation vulnerable to Linux command injection in networkInterfaces() via unsanitized NetworkManager connection profile name
CVE-2026-44724 / GHSA-hvx9-hwr7-wjj9
More information
Details
Summary
On Linux,
systeminformationis vulnerable to command injection innetworkInterfaces()when an active NetworkManager connection profile name contains shell metacharacters.This is not caused by a caller passing attacker-controlled arguments into
networkInterfaces(). The vulnerable value is obtained internally from realnmcli device statusoutput. The library sanitizes the network interface name before using it in shell commands, but it does not apply equivalent sanitization to the parsed NetworkManager connection profile name. That unsanitizedconnectionNameis then interpolated into three shell command strings executed throughexecSync().This issue was validated locally against real NetworkManager and real
nmcli. Calling only:was enough to trigger execution. The injected command ran with the privileges of the calling Node.js process.
Affected Component & Versions
Affected component:
lib/network.jsnetworkInterfaces()nmclihandlingImpact & Threat Model
Confirmed impact:
An attacker who can create or rename an active NetworkManager connection profile can execute arbitrary shell commands when a Node.js process using
systeminformationcallsnetworkInterfaces().Confirmed realistic affected deployments include:
If such a process runs with elevated privileges, the injected command executes with those same elevated privileges.
Confirmed facts:
nmcli device statusreturned the name unchanged.networkInterfaces()parsed that value and reused it in shell commands.Not claimed:
AV:NorAV:Aclaim is made..nmconnectionimport was not confirmed as a remote or unauthenticated path.Root Cause Analysis
The root cause is inconsistent trust handling between the Linux interface name and the NetworkManager connection profile name.
The interface name is sanitized before it is embedded into shell commands:
However, the NetworkManager connection name is parsed from command output and later reused without equivalent sanitization:
That is unsafe because NetworkManager profile names can contain shell metacharacters. Quoting the value inside
"${connectionName}"does not make it safe. A connection name containing",$(),;, backticks, or similar shell syntax can break out of the intended argument context or trigger command substitution.The vulnerable code executes through
execSync(), which invokes a shell for command strings. As a result, interpolatingconnectionNameinto the command string creates a command-injection sink.Exact Code Flow & File Paths
Source:
lib/network.js:538-544The parsed value is then returned as
connectionName.Trigger:
lib/network.js:987-991Sink 1:
lib/network.js:620Sink 2:
lib/network.js:660Sink 3:
lib/network.js:676There are three distinct exploitable
connectionNamesinks.Proof of Concept (PoC) & Reproduction Steps
The following PoC is harmless and local-only. It uses a dummy NetworkManager connection and writes proof files under /tmp.
Run from the project root:
cd /path/to/systeminformationConfirm proof files do not already exist:
Create a malicious NetworkManager dummy profile:
Assign a documentation-only address so Node’s os.networkInterfaces() sees the dummy interface:
nmcli connection modify 'si-ghsa$(id>/tmp/si-nm-id-proof)$(pwd>/tmp/si-nm-pwd-proof)$(env>/tmp/si-nm-env-proof)' \ ipv4.method manual \ ipv4.addresses 192.0.2.253/32 \ ipv6.method disabledActivate the profile:
nmcli connection up 'si-ghsa$(id>/tmp/si-nm-id-proof)$(pwd>/tmp/si-nm-pwd-proof)$(env>/tmp/si-nm-env-proof)'Confirm real nmcli exposes the malicious connection name unchanged:
nmcli device status | grep si-nmghsa0Expected relevant output includes the active connection name:
Trigger the vulnerable library path with no attacker-controlled function argument:
Confirm command execution:
Inspect environment key categories without printing secret values:
validated evidence:
Local Validation Summary & Aggregate Reachability
Validation was performed against real NetworkManager and real
nmcli. The primary proof did not rely on a PATH stub.Observed behavior:
nmcli device status.require('./lib').networkInterfaces()triggered execution.idoutput matched the calling Node.js process identity.pwdoutput matched the Node.js process working directory.Aggregate API reachability:
lib/index.js:94:getStaticData()reachesnetwork.networkInterfaces()as part of static data collection.lib/index.js:307:getAllData()reachesgetStaticData()first.During local validation, an aggregate runtime attempt later hit an unrelated
osinfo.jserror in that environment. Because of that, aggregate source reachability is confirmed, but aggregate call completion was not used as the primary exploit proof.Why This Is Not Intended Behavior
networkInterfaces()is documented and expected to return network interface metadata such as interface name, IP addresses, DHCP state, DNS suffix, and IEEE 802.1X status.The library already shows an intent to protect shell command construction by sanitizing interface names before shell use. The missing sanitization for
connectionNameis inconsistent with that defensive pattern.Executing shell commands embedded in a NetworkManager profile name is not a documented feature, not required to return network metadata, and not an expected design tradeoff. This is a command injection vulnerability caused by unsafe shell-string construction.
Recommended Fix
Avoid shell interpolation entirely for NetworkManager calls.
Replace shell command strings with
execFileSync()orspawnSync()using argument arrays. For example:Recommended code-level changes:
nmcli device status 2>/dev/null | grep ${interfaceName}with argument-array execution and filter rows in JavaScript.nmcli connection show "${connectionName}" | grep ...shell string with argument-array execution.ipv4.method,ipv4.dns-search, and802-1x.eapin JavaScript instead of using shellgrep.Regression Test Ideas
Add Linux-specific tests for NetworkManager connection names containing shell metacharacters.
Suggested malicious connection names:
name$(...)name"; ...; #name|...name;...Expected behavior after the fix:
networkInterfaces()completes without executing shell syntax from the connection name.For unit-level coverage, mock the NetworkManager command wrapper so that
nmcli device statusreturns a connection name containing metacharacters, then assert that subsequent calls use argument arrays rather than shell strings.Credit request
If you publish an advisory or assign a CVE, please credit me as:
Ali Firas (thesmartshadow) - https://www.smartshadow.dev
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
sebhildebrandt/systeminformation (systeminformation)
v5.31.6Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.31.5...v5.31.6
v5.31.5Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.31.4...v5.31.5
v5.31.4Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.31.3...v5.31.4
v5.31.3Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.31.2...v5.31.3
v5.31.2Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.31.1...v5.31.2
v5.31.1Compare Source
Full Changelog: sebhildebrandt/systeminformation@v5.31.0...v5.31.1
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: (UTC)
🚦 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.