# CVE-2021-32831: total.js code injection in utils.set

Source: https://junglewise.ai/threats/cve-2021-32831-total-js-code-injection-in-utils-set  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-09-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2021-32831 · Severity: low · CVSS 3.1 · Published 2021-09-01

total.js is a popular Node.js web framework similar to Laravel or Django. A code injection vulnerability in the utils.set function allows attackers to execute arbitrary code if they can control input passed to this function. This could lead to complete system compromise and data theft.

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

## Quick answers

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

**How severe is CVE-2021-32831?** Low severity, with a CVSS score of 3.1, published 1 September 2021.

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

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

**How is CVE-2021-32831 attacked?** It is attacked with local access.

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

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


## Technical details

The vulnerability is a code injection flaw (CWE-94) in the utils.set function of total.js framework versions before 3.4.9. When the function processes user-controlled values without proper sanitization, attackers can inject and execute arbitrary JavaScript code. The attack requires the ability to influence values passed to utils.set, typically through application features that accept user input. Successful exploitation results in arbitrary code execution with the privileges of the Node.js process. The fix was released in version 3.4.9.

## Affected products

- total.js total.js before 3.4.9

## Identifiers

- CVE-2021-32831
- GHSA-vwhc-pww7-72x6

## Timeline

- 2021-08-30: disclosed: NVD published
- 2021-08-31: patched: Fixed in version 3.4.9

## References

- [https://github.com/totaljs/framework/commit/887b0fa9e162ef7a2dd9cec20a5ca122726373b3](https://github.com/totaljs/framework/commit/887b0fa9e162ef7a2dd9cec20a5ca122726373b3)

## 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 Remote Code Execution in U.set method](https://junglewise.ai/threats/cve-2021-23344-total-js-remote-code-execution-in-u-set-method)
- [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)
