CVE-2021-23449: vm2 prototype pollution sandbox escape

CVE-2021-23449 · Severity: low · CVSS 3.1 · Published 2021-10-19

vm2 is a popular Node.js sandbox library used to safely execute untrusted code. A prototype pollution vulnerability allows attackers to break out of the sandbox and execute arbitrary code on the host system. This can lead to complete system compromise when vm2 is used to run untrusted scripts.

Technologies: vm2 (npm). Vendors: npm.

Quick answers

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

  • vm2 (npm): upgrade to 3.9.4 or later
    npm install vm2@3.9.4

Technical details

The vulnerability is a prototype pollution attack in vm2 before version 3.9.4 that exploits the JavaScript prototype chain to escape the sandbox. The attack manipulates object prototypes to modify behavior of sandboxed code execution, allowing an attacker to override security controls and execute arbitrary code on the host machine. No authentication or special user interaction is required—malicious code executed within the vm2 sandbox can trigger the escape. The vulnerability was patched in version 3.9.4; users must upgrade immediately to remediate the risk.

Affected products

  • vm2 vm2 before 3.9.4

Identifiers

  • CVE-2021-23449
  • GHSA-rjf2-j2r6-q8gr

Timeline

  • 2021-09-07: disclosed
  • 2021-10-18: advisory
  • 2021-10-19: patched

References

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