ZeroHour

CVE-2021-21315

KEVmass

Command Injection in systeminformation npm Package (CVE-2021-21315)

CISA: System Information Library for Node.JS Command Injection

CVSS 3.1
7.8 high
EPSS
91%p100
Published
()
KEV added
AI analysis

The systeminformation npm package, a widely used Node.js library for retrieving hardware, system, and OS details, contains a command injection flaw (CWE-78) in versions before 5.3.1. The flaw is triggered when untrusted, user-controlled parameters are passed to functions such as si.inetLatency(), si.inetChecksite(), si.services(), and si.processLoad(), allowing injected commands to be executed by the underlying operating system. A successful attacker gains the ability to run arbitrary commands with the privileges of the Node.js process on the affected host, potentially enabling further compromise. Any application or service built on the npm package that forwards attacker-influenced input into these functions is affected, including deployments where the library is bundled into other products (e.g., Apache Cordova applications per the CPE data). The vulnerability was added to CISA's Known Exploited Vulnerabilities Catalog on 2022-01-18, indicating exploitation in the wild, and its EPSS score of 90.7% places it in the top percentile for near-term exploitation probability.

What to do: Upgrade the systeminformation npm package to version 5.3.1 or later wherever it appears in your Node.js dependency trees. If upgrading is not immediately possible, sanitize all parameters passed to si.inetLatency(), si.inetChecksite(), si.services(), and si.processLoad(), accepting only plain strings and rejecting arrays. Audit internet-facing Node.js applications (including any Cordova-packaged deployments) for use of these functions and confirm they are patched, per the CISA KEV required action.

Affected
systeminformation (npm package, System Information Library for Node.JS)all versions before 5.3.1; fixed in 5.3.1
apache cordova (associated via CPE)
Estimated exposure
mass>1,000,000 potential installations (npm package consistently records on the order of a million-plus weekly downloads); actual exploitable deployments are fewer… — Estimate based on the npm package's large published weekly download volume (roughly a million or more per week), with the caveat that direct exploitability requires application code to pass user-controlled strings or arrays into the four…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

The System Information Library for Node.JS (npm package "systeminformation") 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. Problem was fixed in version 5.3.1. As a workaround instead of upgrading, be sure to check or sanitize service parameters that are passed to si.inetLatency(), si.inetChecksite(), si.services(), si.processLoad() ... do only allow strings, reject any arrays. String sanitation works as expected.

CISA Known Exploited Vulnerability
Affected
Npm package System Information Library for Node.JS
Required action
Apply updates per vendor instructions.
Due date
Ransomware use
Unknown
Vendors
systeminformationapache
Products
systeminformation, cordova
Weakness
CWE-78
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news