CVE-2020-28494: total.js command injection in image processing

CVE-2020-28494 · Severity: low · CVSS 3.1 · Published 2021-02-05

total.js is a Node.js web framework that includes image processing capabilities. A command injection vulnerability in the image.pipe and image.stream functions allows remote attackers to execute arbitrary system commands on servers running vulnerable versions, potentially leading to complete system compromise, data theft, or service disruption.

Technologies: total.js (npm). Vendors: npm.

Quick answers

Is CVE-2020-28494 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2020-28494 being exploited in the wild.
How severe is CVE-2020-28494?
Low severity, with a CVSS score of 3.1, published 5 February 2021.
Which products and versions are affected?
total.js (npm) SEMVER:introduced=0,fixed=3.4.7.
Is there a fix for CVE-2020-28494?
Yes. total.js (npm): upgrade to 3.4.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2020-28494 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2020-28494?
Check whether you run total.js (npm) 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

  • total.js (npm): upgrade to 3.4.7 or later
    npm install total.js@3.4.7

Technical details

A command injection vulnerability exists in total.js versions before 3.4.7 in the image processing module. The vulnerable functions (image.pipe and image.stream) use the type parameter to construct shell commands executed via child_process.spawn with shell option set to true. Because the type parameter is not properly sanitized, attackers can inject arbitrary commands through special characters and shell metacharacters. The vulnerability is remotely exploitable with no authentication or user interaction required. An attacker can achieve arbitrary code execution on the affected server by crafting malicious input to the image type parameter. The issue was fixed in version 3.4.7 with proper input validation.

Affected products

  • total.js total.js < 3.4.7

Identifiers

  • CVE-2020-28494
  • GHSA-4449-hg37-77v8

Timeline

  • 2021-01-29: disclosed
  • 2021-02-03: patched: Version 3.4.7 released with fix
  • 2021-02-05: advisory: GHSA-4449-hg37-77v8 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.