← back
CVE-2021-21315

Command Injection Vulnerability

CVSS 7.1 HIGHEPSS 90.2%● KEVCWE-78
In short

A Node.js library called 'systeminformation' allows attackers to run unauthorized commands on a server if untrusted data is passed to certain functions like inetLatency() or services(). This happens because the library doesn't properly validate user input before executing system commands.

Technical detail

Command injection vulnerability in systeminformation <5.3.1 where functions (inetLatency, inetChecksite, services, processLoad) fail to sanitize parameters before passing them to shell command execution. Exploitation requires passing array or malicious string parameters to vulnerable functions; impact includes arbitrary command execution with the privileges of the Node.js process. Fixed in version 5.3.1 by implementing proper input validation.

Summary generated and translated by AI from the official 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.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.

Want to know if your infrastructure is exposed to this?

Talk to TrueHacking →