CVE-2020-7778: Systeminformation OS Command Injection Vulnerability
HIGHCVE-2020-7778 is a HIGH (CVSS 7.3) os command injection 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 os command injection in systeminformation. Remediation is available by upgrading affected packages to version 4.30.2.
CVE-2020-7778 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2020-7778
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.
npm install systeminformation@4.30.2
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-2020-7778, 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 4.30.2), 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
CVE-2020-7778 Affected Systeminformation Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
systeminformation
|
npm |
< 4.30.2
|
4.30.2
|
References
Frequently Asked Questions
What is CVE-2020-7778?
Which Systeminformation versions are affected?
What version fixes CVE-2020-7778?
Is systeminformation affected?
What is the CVSS score of CVE-2020-7778?
What CWE is associated with CVE-2020-7778?
How can I check npm dependencies for CVE-2020-7778?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8j36-q8x7-pm6q",
"modified" : "2021-04-13T18:32:29Z",
"published" : "2022-02-09T23:14:11Z",
"aliases" : [ "CVE-2020-7778" ],
"summary" : "OS Command Injection in systeminformation",
"details" : "This affects the package systeminformation before 4.30.2. The attacker can overwrite the properties and functions of an object, which can lead to executing OS commands.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "systeminformation"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.30.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7778"
}, {
"type" : "WEB",
"url" : "https://github.com/sebhildebrandt/systeminformation/commit/11103a447ab9550c25f1fbec7e6d903720b3fea8%23diff-970ae648187190f86bafc8f193b7538200eba164fad0674428b6487582c089cc"
}, {
"type" : "WEB",
"url" : "https://github.com/sebhildebrandt/systeminformation/commit/73dce8d717ca9c3b7b0d0688254b8213b957f0fa%23diff-970ae648187190f86bafc8f193b7538200eba164fad0674428b6487582c089cc"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/EffectRenan/b434438938eed0b21b376cedf5c81e80"
}, {
"type" : "WEB",
"url" : "https://github.com/sebhildebrandt/systeminformation/blob/master/lib/internet.js"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-SYSTEMINFORMATION-1043753"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-13T18:32:29Z",
"nvd_published_at" : "2020-11-26T11:15:00Z"
}
}