Junglewise Threat Intelligence

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

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

Technologies: total.js (npm), Total.js Framework. Vendors: npm, Total.js.

Executive brief

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.

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

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

Related threats