Patchfirst
CVE-2023-29017 Public exploit Critical · 10.0 EPSS 63.2%

vm2 Sandbox Escape vulnerability

patriksimek · vm2

Summary

The vm2 sandbox library from patriksimek fails to properly handle host objects passed to Error.prepareStackTrace when unhandled async errors occur, in versions prior to 3.9.15. An attacker who can get untrusted code run inside the sandbox can bypass its protections and execute code on the host, requiring no privileges or user interaction and reachable over the network.

Official description · CVE.org

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Prior to version 3.9.15, vm2 was not properly handling host objects passed to `Error.prepareStackTrace` in case of unhandled async errors. A threat actor could bypass the sandbox protections to gain remote code execution rights on the host running the sandbox. This vulnerability was patched in the release of version 3.9.15 of vm2. There are no known workarounds.

Breakdown
31.8 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Public exploit code (PoC-in-GitHub) appeared 1 day after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+1 day

See the family tree

7 fixes in vm2 over 15 months. The latest fix listed for vm2 is 3.9.18.

Fixes in vm2npm package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 3.9.6CVE-2021-2355511 Feb 2022
  2. 3.9.10CVE-2022-2589321 Dec 2022
  3. 3.9.11CVE-2022-360676 Sep 2022
  4. 3.9.15CVE-2023-290176 Apr 2023
  5. 3.9.16CVE-2023-2919914 Apr 2023
  6. 3.9.17CVE-2023-3054717 Apr 2023
  7. 3.9.18CVE-2023-3231315 May 2023Latest listed

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: vm2.

Upgrade to 3.9.17 or later

Fixes this CVE and 1 other known vulnerability in this package (CVE-2023-30547).

npmnpm install vm2@3.9.17

First fixed in 3.9.15 for CVE-2023-29017.

Affected versions

If you runUpgrade to
All versions before 3.9.153.9.17first fix for this CVE: 3.9.15

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

4 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close