CVE-2021-21388: systeminformation command injection

CVE-2021-21388 · Severity: low · CVSS 3.1 · Published 2021-04-06

systeminformation is a popular Node.js library that retrieves detailed system and hardware information. A command injection vulnerability allows an attacker with application-level access to inject malicious commands through vulnerable functions, potentially gaining code execution on the system running the application.

Technologies: systeminformation (npm). Vendors: npm.

Quick answers

Is CVE-2021-21388 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-21388 being exploited in the wild.
How severe is CVE-2021-21388?
Low severity, with a CVSS score of 3.1, published 6 April 2021.
Which products and versions are affected?
systeminformation (npm) SEMVER:introduced=0,fixed=5.6.4.
Is there a fix for CVE-2021-21388?
Yes. systeminformation (npm): upgrade to 5.6.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2021-21388 attacked?
It is attacked over the network.
Am I affected by CVE-2021-21388?
Check whether you run systeminformation (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • systeminformation (npm): upgrade to 5.6.4 or later
    npm install systeminformation@5.6.4

Technical details

The vulnerability is a command injection flaw (CWE-77, CWE-78) in systeminformation versions prior to 5.6.4. Vulnerable functions—including si.inetLatency(), si.inetChecksite(), si.services(), and si.processLoad()—fail to properly sanitize or validate user-supplied input (particularly array parameters) before passing them to shell commands. An authenticated attacker can exploit this by injecting shell metacharacters into service parameters, achieving arbitrary command execution. The fix involves parameter validation to reject arrays and properly sanitize string inputs. Upgrading to version 5.6.4 or later eliminates the vulnerability.

Affected products

  • sebhildebrandt systeminformation < 5.6.4

Identifiers

  • CVE-2021-21388
  • GHSA-jff2-qjw8-5476

Timeline

  • 2021-04-02: disclosed
  • 2021-04-06: patched: Version 5.6.4 released with parameter validation fix
  • 2021-04-06: advisory: GHSA-jff2-qjw8-5476 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.