# CVE-2021-21315: System Information Library for Node.JS Command Injection

Source: https://junglewise.ai/threats/cve-2021-21315-system-information-library-for-node-js-command-injection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-02-16. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2021-21315 · Severity: critical · CVSS 3.1 · Exploited in the wild · Published 2021-02-16

The systeminformation library for Node.js, which is used to retrieve hardware and operating system details, contains a vulnerability that allows for unauthorized command execution. An attacker with local access to a system using this library could execute arbitrary operating system commands, potentially leading to full system compromise or data theft. This issue affects applications that pass unsanitized user input, particularly arrays, into specific library functions.

Technologies: [systeminformation (npm)](https://junglewise.ai/threats/technologies/systeminformation). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-21315 exploited in the wild?** Yes. CVE-2021-21315 is known to be exploited in the wild, first recorded on 18 January 2022. Treat it as urgent.

**How severe is CVE-2021-21315?** Critical severity, with a CVSS score of 3.1, published 16 February 2021.

**Which products and versions are affected?** systeminformation (npm) SEMVER:introduced=0,fixed=5.3.1.

**Is there a fix for CVE-2021-21315?** Yes. systeminformation (npm): upgrade to 5.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-21315 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2021-21315?** Check whether you run systeminformation (npm) or Npm Package System Information Library for Node.js 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.3.1 or later

  ```sh
  npm install systeminformation@5.3.1
  ```


## Technical details

A command injection vulnerability (CWE-78) exists in the systeminformation npm package before version 5.3.1. The root cause is improper neutralization of special elements in parameters passed to functions such as si.inetLatency(), si.inetChecksite(), si.services(), and si.processLoad(). Specifically, the library failed to properly validate input types, allowing attackers to bypass string sanitization by passing arrays instead of strings. An attacker with local access can exploit this to execute arbitrary shell commands with the privileges of the Node.js process. The vulnerability is fixed in version 5.3.1 by implementing stricter parameter type checks.

## Affected products

- Sebastian Hildebrandt systeminformation < 5.3.1

## Identifiers

- CVE-2021-21315
- GHSA-2m8v-572m-ff2v

## Timeline

- 2021-02-14: patched: Fix committed to repository
- 2021-02-16: disclosed: Security advisory published
- 2022-01-18: kev added: Added to CISA Known Exploited Vulnerabilities Catalog

## References

- [https://github.com/sebhildebrandt/systeminformation/security/advisories/GHSA-2m8v-572m-ff2v](https://github.com/sebhildebrandt/systeminformation/security/advisories/GHSA-2m8v-572m-ff2v)
- [https://github.com/sebhildebrandt/systeminformation/commit/07daa05fb06f24f96297abaa30c2ace8bfd8b525](https://github.com/sebhildebrandt/systeminformation/commit/07daa05fb06f24f96297abaa30c2ace8bfd8b525)
- [https://github.com/sebhildebrandt/systeminformation](https://github.com/sebhildebrandt/systeminformation)
- [https://lists.apache.org/thread.html/r8afea9a83ed568f2647cccc6d8d06126f9815715ddf9a4d479b26b05%40%3Cissues.cordova.apache.org%3E](https://lists.apache.org/thread.html/r8afea9a83ed568f2647cccc6d8d06126f9815715ddf9a4d479b26b05%40%3Cissues.cordova.apache.org%3E)
- [https://lists.apache.org/thread.html/r8afea9a83ed568f2647cccc6d8d06126f9815715ddf9a4d479b26b05@%3Cissues.cordova.apache.org%3E](https://lists.apache.org/thread.html/r8afea9a83ed568f2647cccc6d8d06126f9815715ddf9a4d479b26b05@%3Cissues.cordova.apache.org%3E)
- [https://security.netapp.com/advisory/ntap-20210312-0007](https://security.netapp.com/advisory/ntap-20210312-0007)

## Related threats

- [systeminformation prototype pollution in networkStats](https://junglewise.ai/threats/cve-2026-116674-systeminformation-is-a-system-and-os-information-library-for)
- [systeminformation has path traversal in Linux networkStats() that allows symlink-based file disclosure outside /sys/class/net](https://junglewise.ai/threats/cve-2026-116673-systeminformation-is-a-system-and-os-information-library-for)
- [systeminformation PowerShell command injection via Unicode quotation marks](https://junglewise.ai/threats/cve-2026-116576-systeminformation-is-a-system-and-os-information-library-for)
- [sebhildebrandt systeminformation OS command injection in networkInterfaces](https://junglewise.ai/threats/cve-2026-50289-sebhildebrandt-systeminformation-os-command-injection-in)
- [sebhildebrandt systeminformation command injection in networkInterfaces](https://junglewise.ai/threats/cve-2026-44724-sebhildebrandt-systeminformation-command-injection-in)
