CVE-2020-28494: Total.js Command Injection Vulnerability
HIGHCVE-2020-28494 is a HIGH (CVSS 8.6) command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Total.js libraries in the npm ecosystem. The issue involves command injection in total.js. Remediation is available by upgrading affected packages to version 3.4.7.
CVE-2020-28494 at a Glance
Security Impact
CVSS: 8.6
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:H/I:L/A:L).
How to Fix CVE-2020-28494
To remediate this vulnerability, upgrade all affected Total.js 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 total.js@3.4.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls total.js
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-28494, inspect your project dependencies using npm:
npm ls total.js
Analyze the terminal output to locate any version of Total.js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4.7), your application is affected.
Note: The npm ls total.js 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 Total.js, 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-28494 Affected Total.js Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
total.js
|
npm |
< 3.4.7
|
3.4.7
|
References
Frequently Asked Questions
What is CVE-2020-28494?
Which Total.js versions are affected?
What version fixes CVE-2020-28494?
Is total.js affected?
What is the CVSS score of CVE-2020-28494?
What CWE is associated with CVE-2020-28494?
How can I check npm dependencies for CVE-2020-28494?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4449-hg37-77v8",
"modified" : "2021-07-28T18:57:23Z",
"published" : "2021-02-05T20:43:27Z",
"aliases" : [ "CVE-2020-28494" ],
"summary" : "Command injection in total.js",
"details" : "There is a command injection vulnerability that affects the package total.js before version 3.4.7. The issue occurs in the image.pipe and image.stream functions. The type parameter is used to build the command that is then executed using child_process.spawn. The issue occurs because child_process.spawn is called with the option shell set to true and because the type parameter is not properly sanitized.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "total.js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.4.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28494"
}, {
"type" : "WEB",
"url" : "https://github.com/totaljs/framework/commit/6192491ab2631e7c1d317c221f18ea613e2c18a5"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-TOTALJS-1046672"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/total.js"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-02-03T07:49:15Z",
"nvd_published_at" : "2021-02-02T11:15:00Z"
}
}