CVE-2021-21388: Systeminformation Command Injection Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-jff2-qjw8-5476
CVSS 8.9
CWE-78 CWE-77
Published
Advisory Summary

CVE-2021-21388 is a HIGH (CVSS 8.9) command injection vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Systeminformation libraries in the npm ecosystem. The issue involves command injection vulnerability in systeminformation. Remediation is available by upgrading affected packages to version 5.6.4.

CVE-2021-21388 at a Glance

CVE Identifier CVE-2021-21388
GHSA Identifier GHSA-jff2-qjw8-5476
Severity HIGH
CVSS v3.1 Base Score 8.9
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Systeminformation
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability High (A:H)

How to Fix CVE-2021-21388

To remediate this vulnerability, upgrade all affected Systeminformation dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

systeminformation fixed: 5.6.4
npm install systeminformation@5.6.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls systeminformation

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-21388, inspect your project dependencies using npm:

npm ls systeminformation

Analyze the terminal output to locate any version of Systeminformation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.6.4), your application is affected.

Note: The npm ls systeminformation command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Systeminformation, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact command injection vulnerability ### Patches Problem was fixed with a parameter check. Please upgrade to version >= 5.6.4 ### Workarounds If you cannot upgrade, 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.

CVE-2021-21388 Affected Systeminformation Versions

1 component(s)
Fixed Versions:
5.6.4
Product / Package Ecosystem Affected Versions Fixed Version
systeminformation
npm
< 5.6.4
5.6.4

References

Frequently Asked Questions

What is CVE-2021-21388?
CVE-2021-21388 is a security vulnerability in Systeminformation involving Command Injection Vulnerability in systeminformation under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Systeminformation versions are affected?
Affected versions include releases prior to 5.6.4 across affected packages: systeminformation.
What version fixes CVE-2021-21388?
Upgrading to 5.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is systeminformation affected?
Yes, systeminformation is affected in releases prior to 5.6.4. Upgrade your dependency to 5.6.4 or later.
What is the CVSS score of CVE-2021-21388?
CVE-2021-21388 has a CVSS v3.1 base score of 8.9 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:H.
What CWE is associated with CVE-2021-21388?
CVE-2021-21388 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2021-21388?
Run the dependency tree command: 'npm ls systeminformation'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jff2-qjw8-5476",
  "modified" : "2021-04-29T17:22:56Z",
  "published" : "2021-04-06T17:30:14Z",
  "aliases" : [ "CVE-2021-21388" ],
  "summary" : "Command Injection Vulnerability in systeminformation",
  "details" : "### Impact\ncommand injection vulnerability\n\n### Patches\nProblem was fixed with a parameter check. Please upgrade to version >= 5.6.4\n\n### Workarounds\nIf you cannot upgrade, 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "systeminformation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.6.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sebhildebrandt/systeminformation/security/advisories/GHSA-jff2-qjw8-5476"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21388"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sebhildebrandt/systeminformation/commit/01ef56cd5824ed6da1c11b37013a027fdef67524"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sebhildebrandt/systeminformation/commit/0be6fcd575c05687d1076d5cd6d75af2ebae5a46"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sebhildebrandt/systeminformation/commit/7922366d707de7f20995fc8e30ac3153636bf35f"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/systeminformation"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77", "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-02T20:19:25Z",
    "nvd_published_at" : "2021-04-29T18:15:00Z"
  }
}