PT-2021-7658 · Npm · Systeminformation

Iva2K

·

Published

2021-02-16

·

Updated

2025-10-24

·

CVE-2021-21315

CVSS v3.1

7.8

High

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions systeminformation versions prior to 5.3.1
Description The System Information Library for Node.JS is an open source collection of functions to retrieve detailed hardware, system and OS information. In systeminformation before version 5.3.1, there is a command injection vulnerability. The problem was fixed in version 5.3.1. This vulnerability can be exploited by passing malicious parameters to certain functions, allowing an attacker to execute arbitrary commands. For example, the API endpoint "/api/getServices" can be exploited by passing a malicious "name" parameter, such as "name[]=$(echo -e 'test' > pwn.txt)".
Recommendations For systeminformation versions prior to 5.3.1, upgrade to version 5.3.1 or later to fix the command injection vulnerability. As a workaround, be sure to check or sanitize service parameters that are passed to si.inetLatency(), si.inetChecksite(), si.services(), si.processLoad() ... only allow strings, reject any arrays. String sanitation works as expected.

Exploit

Fix

OS Command Injection

Weakness Enumeration

Related Identifiers

BDU:2023-01049
CVE-2021-21315
GHSA-2M8V-572M-FF2V

Affected Products

Systeminformation