# CVE-2021-23344: Total.js Remote Code Execution in U.set method

Source: https://junglewise.ai/threats/cve-2021-23344-total-js-remote-code-execution-in-u-set-method  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-03-19. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2021-23344 · Severity: low · CVSS 3.1 · Published 2021-03-19

Total.js is a popular Node.js framework used to build web, desktop, and IoT applications. A security flaw in the framework allows an attacker to execute arbitrary commands on the server hosting the application. This could lead to a complete system takeover, theft of sensitive customer data, or a total disruption of services.

Technologies: [total.js (npm)](https://junglewise.ai/threats/technologies/total-js). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-23344 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-23344 being exploited in the wild.

**How severe is CVE-2021-23344?** Low severity, with a CVSS score of 3.1, published 19 March 2021.

**Which products and versions are affected?** total.js (npm) SEMVER:introduced=0,fixed=3.4.8.

**Is there a fix for CVE-2021-23344?** Yes. total.js (npm): upgrade to 3.4.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-23344 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-23344?** 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.8 or later

  ```sh
  npm install total.js@3.4.8
  ```


## Technical details

A Remote Code Execution (RCE) vulnerability exists in the total.js framework due to improper input validation in the 'set' utility function (U.set). The vulnerability is classified as Code Injection (CWE-94), where the 'path' argument of the function can be manipulated to execute arbitrary JavaScript code, such as through the use of eval() or child_process.execSync(). An attacker can exploit this over the network without any prior authentication or user interaction. If successful, the attacker gains the ability to execute system-level commands with the privileges of the Node.js process. The issue is resolved in version 3.4.8.

## Affected products

- totaljs total.js < 3.4.8

## Identifiers

- CVE-2021-23344
- GHSA-3wj8-vp9h-rm6m

## Timeline

- 2021-02-19: disclosed: Vulnerability disclosed by Snyk security team.
- 2021-03-04: advisory: NVD and Snyk published advisories.
- 2021-03-19: advisory: GitHub Advisory published.

## References

- [https://github.com/totaljs/framework/commit/c812bbcab8981797d3a1b9993fc42dad3d246f04](https://github.com/totaljs/framework/commit/c812bbcab8981797d3a1b9993fc42dad3d246f04)
- [https://snyk.io/vuln/SNYK-JS-TOTALJS-1077069](https://snyk.io/vuln/SNYK-JS-TOTALJS-1077069)

## Related threats

- [total.js code injection in U.set() and U.get()](https://junglewise.ai/threats/cve-2021-23389-total-js-code-injection-in-u-set-and-u-get)
- [total.js code injection in utils.set](https://junglewise.ai/threats/cve-2021-32831-total-js-code-injection-in-utils-set)
- [total.js command injection in image processing](https://junglewise.ai/threats/cve-2020-28494-total-js-command-injection-in-image-processing)
- [total.js prototype pollution in set function](https://junglewise.ai/threats/cve-2020-28495-total-js-prototype-pollution-in-set-function)
- [Total.js CMS cross-site scripting in admin interface](https://junglewise.ai/threats/cve-2019-10260-total-js-cms-cross-site-scripting-in-admin-interface)
