Systeminformation has command injection vulnerability in getWindowsIEEE8021x (SSID)
Summary
The SSID is not sanitized when before it is passed as a parameter to cmd.exe in the getWindowsIEEE8021x function. 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 ... in getWindowsWirelessIfaceSSID, and then passed to cmd.exe /d /s /c "netsh wlan show profiles ... in getWindowsIEEE8021x, 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:
a" | ping /t 127.0.0.1 &
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.
a" | %SystemDrive%\a\a.exe &
Then, the vulnerable function can be executed on the victim system, for example, using:
const si = require('systeminformation');
si.networkInterfaces((net) => { console.log(net) });
Now the chosen command, PING.exe or a.exe will 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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | systeminformation | < 5.23.7 | 5.23.7 |
References
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-94- Platform
- npm
- Package
systeminformation- Disclosed
- 20.12.2024
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-cvv5-9h9w-qp2m - CC BY 4.0
Vulnerability history: systeminformation
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 14
- First → latest
- 10.2020 07.2026
- Without a fix
- 0
- Exploited in attacks
- 1
Severity breakdown
- Critical 1
- High 10
- Medium 3
Disclosures per year
- 2020: 4
- 2021: 2
- 2022: 1
- 2023: 1
- 2024: 1
- 2025: 1
- 2026: 4
-
Systeminformation has command injection vulnerability in getWindowsIEEE8021x (SSID) this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.