Patchfirst
CVE-2021-21315 KEVPublic exploit High · 7.8 EPSS 90.7%

System Information Library for Node.JS Command Injection

Npm package · System Information Library for Node.JS

Summary

The systeminformation npm package, a Node.js library for retrieving hardware, system and OS information, contains an OS command injection flaw in versions before 5.3.1, where service parameters passed to functions such as si.inetLatency(), si.inetChecksite(), si.services() and si.processLoad() are not properly neutralised. An attacker with local access and low privileges can inject operating system commands through these parameters, provided the application passes untrusted input, including arrays, to those functions without user interaction being required.

Official description · NVD

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.

Breakdown
68.4 / 100
Exploited
Yes, in CISA KEV
Reports
0
Tactics
1/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

First seen exploited 3 months after disclosure. Public exploit code (PoC-in-GitHub) appeared 13 days after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+13 days
  3. First seen exploitedVulnCheck KEV evidence+3 mo
  4. Added to CISA KEVEU database agrees+11 mo

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

See the family tree

6 related vulnerabilities in the same code over 6 months. The latest fix listed for systeminformation is 5.23.7.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2020-7752Command Injection26 Oct 2020
  2. relatedHigh

    Why these are linked:

    CVE-2020-7778Prototype Pollution26 Nov 2020
  3. relatedHigh

    Why these are linked:

    • Fixed one release later4.30.2 → 4.30.5 (systeminformation)
    • Same code patched: internet.js, network.js, processes.js, util.js (machine-matched)Functions: inetChecksite, isPrototypePolluted, networkStatsSingle, servicescommit 8113ff0commit 73dce8dcommit 11103a4
    CVE-2020-26245Prototype Pollution leading to Command Injection in…27 Nov 2020
  4. relatedHigh

    Why these are linked:

    CVE-2020-26274Command Injection Vulnerability in systeminformation16 Dec 2020
  5. same family
    This CVECVE-2021-21315System Information Library for Node.JS Command Injection16 Feb 2021KEV
  6. relatedHigh

    Why these are linked:

    • Fixed one release later5.3.1 → 5.6.4 (systeminformation)
    • Same code patched: docker.js, internet.js, network.js, processes.js (machine-matched)Functions: inetChecksite, inetLatency, processLoad, servicescommit 07daa05commit 01ef56ccommit 0be6fcd
    • Similar weakness in the same product (machine-matched)same package + description similarity
    CVE-2021-21388Command Injection Vulnerability in systeminformation29 Apr 2021

Fixes in systeminformationnpm package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 4.30.2CVE-2020-777826 Nov 2020
  2. 4.30.5CVE-2020-2624527 Nov 2020
  3. 4.31.1CVE-2020-2627416 Dec 2020
  4. 5.3.1CVE-2021-2131516 Feb 2021KEV
  5. 5.6.4CVE-2021-2138829 Apr 2021
  6. 5.21.7CVE-2023-4281021 Sep 2023
  7. 5.23.7CVE-2024-5633420 Dec 2024Latest listed

techniques

1 , grouped by in kill-chain order, 1 cited passage 1

ExecutionTA0002

Command and Scripting Interpreter T1059 Medium
AI mapping from the description · how it is exploited

command injection is the exploitation vector

there is a command injection vulnerability
From the official description (NVD) Original (opens in a new tab) ↗

Detection

0 rules for this CVE · 95 general rules for its techniques

Rules for this CVE

0 that reference CVE-2021-21315 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

General rules for this CVE’s techniques

These detect the technique in general, not this specific vulnerability.

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: systeminformation.

npmsysteminformationGHSA-2m8v-572m-ff2v

Upgrade to 5.3.1 or later

npmnpm install systeminformation@5.3.1

The first fix for CVE-2021-21315. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
All versions before 5.3.15.3.1

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

6 links, grouped by NVD tag (5 duplicates merged)
↑ ↓ chooseEnter openEsc close