cbcvebase.
CVE-2023-37903
published 2023-07-21

CVE-2023-37903: vm2 is an open source vm/sandbox for Node.js. In vm2 for versions up to and including 3.9.19, Node.js custom inspect function allows attackers to escape the…

PriorityP269critical10CVSS 3.1
AVNACLPRNUINSCCHIHAH
EPSS
2.79%
84.6th percentile
vm2 is an open source vm/sandbox for Node.js. In vm2 for versions up to and including 3.9.19, Node.js custom inspect function allows attackers to escape the sandbox and run arbitrary code. This may result in Remote Code Execution, assuming the attacker has arbitrary code execution primitive inside the context of vm2 sandbox. There are no patches and no known workarounds. Users are advised to find an alternative software.

Affected

6 ranges
VendorProductVersion rangeFixed in
ansible-automation-platformautomation-portal
patriksimekvm2< 3.11.43.11.4
rhdhrhdh-hub-rhel9
vm2_projectvm2<= 3.9.19
vm2_projectvm2>= 0 < 3.11.43.11.4
vm2_projectvm20 – 3.9.19

Detection & IOCsextracted from sources · hover to see the quote

  • The sandbox escape is triggered by omitting the `require` option entirely (leaving it undefined) while setting `nesting: true`. The strict equality check `options.require === false` in nodevm.js line 263 is bypassed because `undefined !== false`, causing the security guard to be skipped.
  • The exploit leverages Node.js custom inspect function inside a vm2 sandbox context to escape and execute arbitrary code. Monitor for unusual use of custom inspect functions within vm2 sandbox invocations.
  • After the security guard is bypassed, the destructuring default `require: requireOpts = false` at nodevm.js line 280 produces the exact forbidden configuration (nesting: true + require effectively false), enabling sandbox escape. Audit vm2 instantiation calls for `nesting: true` without an explicit `require` option.
  • ·The vulnerable code path (vm2 sandbox with nesting + require bypass) is only reachable if user-supplied JavaScript can be routed into the vm2 sandbox runtime. In Red Hat Developer Hub and Ansible Automation Platform, the vulnerable sandbox functionality is not invoked in production code paths and user input cannot reach it under standard deployment.
  • ·CVE-2023-37903 affects vm2 versions up to and including 3.9.19 with no patch available at time of initial disclosure. The bypass of the subsequent fix (introduced for GHSA-8hg8-63c5-gwmx) is patched in vm2 version 3.11.4.

CVSS provenance

nvdv3.110.0CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
ghsa10.0CRITICAL
osv10.0CRITICAL
vendor_redhat10.0CRITICAL
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.