CVE-2023-37903
published 2023-07-21CVE-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
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| ansible-automation-platform | automation-portal | — | — |
| patriksimek | vm2 | < 3.11.4 | 3.11.4 |
| rhdh | rhdh-hub-rhel9 | — | — |
| vm2_project | vm2 | <= 3.9.19 | — |
| vm2_project | vm2 | >= 0 < 3.11.4 | 3.11.4 |
| vm2_project | vm2 | 0 – 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.
GHSA
vm2 has a CVE-2023-37903 patch bypass: nesting:true without explicit require still allows full RCE
ghsa·2026-05-29·CVSS 10.0
CVE-2026-47137 [CRITICAL] CWE-913 vm2 has a CVE-2023-37903 patch bypass: nesting:true without explicit require still allows full RCE
vm2 has a CVE-2023-37903 patch bypass: nesting:true without explicit require still allows full RCE
## Summary
The fix for GHSA-8hg8-63c5-gwmx (CVE-2023-37903) introduced a check in `nodevm.js` line 263 that blocks the combination `nesting: true` + `require: false`. However, the check uses strict equality (`options.require === false`), which is trivially bypassed by omitting the `require` option entirely.
When `require` is not specified, `options.require` is `undefined`, not `false`. The strict equality check fails, so the security guard is skipped. Immediately after (line 280), the destructuring default `require: requireOpts = false` assigns `requireOpts = false`, producing the exact configuration the patch was designed to prevent.
## Root Cause
```javascript
// nodevm.js:263 — the se
GHSA
vm2 Sandbox Escape vulnerability
ghsa·2023-07-13·CVSS 10.0
CVE-2023-37903 [CRITICAL] CWE-78 vm2 Sandbox Escape vulnerability
vm2 Sandbox Escape vulnerability
In vm2 for versions up to 3.9.19, Node.js custom inspect function allows attackers to escape the sandbox and run arbitrary code.
### Impact
Remote Code Execution, assuming the attacker has arbitrary code execution primitive inside the context of vm2 sandbox.
### Patches
None.
### Workarounds
None.
### References
PoC is to be disclosed on or after the 5th of September.
### Similarity with [CVE-2023-37466](https://nvd.nist.gov/vuln/detail/CVE-2023-37466)
While this advisory might look similar to [CVE-2023-37466](https://nvd.nist.gov/vuln/detail/CVE-2023-37466), it is a completely different way of escaping the sandbox.
### For more information
If you have any questions or comments about this advisory:
- Open an issue in [VM2](https://github.com/patriks
OSV
vm2 Sandbox Escape vulnerability
osv·2023-07-13·CVSS 10.0
CVE-2023-37903 [CRITICAL] vm2 Sandbox Escape vulnerability
vm2 Sandbox Escape vulnerability
In vm2 for versions up to 3.9.19, Node.js custom inspect function allows attackers to escape the sandbox and run arbitrary code.
### Impact
Remote Code Execution, assuming the attacker has arbitrary code execution primitive inside the context of vm2 sandbox.
### Patches
None.
### Workarounds
None.
### References
PoC is to be disclosed on or after the 5th of September.
### Similarity with [CVE-2023-37466](https://nvd.nist.gov/vuln/detail/CVE-2023-37466)
While this advisory might look similar to [CVE-2023-37466](https://nvd.nist.gov/vuln/detail/CVE-2023-37466), it is a completely different way of escaping the sandbox.
### For more information
If you have any questions or comments about this advisory:
- Open an issue in [VM2](https://github.com/patriks
Red Hat
vm2: vm2: Sandbox escape leading to arbitrary code execution via security bypass
vendor_redhat·2026-06-12·CVSS 10.0
CVE-2026-47137 [CRITICAL] CWE-480 vm2: vm2: Sandbox escape leading to arbitrary code execution via security bypass
vm2: vm2: Sandbox escape leading to arbitrary code execution via security bypass
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the fix for GHSA-8hg8-63c5-gwmx (CVE-2023-37903) introduced a check in nodevm.js line 263 that blocks the combination nesting: true + require: false. However, the check uses strict equality (options.require === false), which is trivially bypassed by omitting the require option entirely. When require is not specified, options.require is undefined, not false. The strict equality check fails, so the security guard is skipped. Immediately after (line 280), the destructuring default require: requireOpts = false assigns requireOpts = false, producing the exact configuration the patch was designed to prevent. This issue has been patched in versio
Red Hat
vm2: custom inspect function allows attackers to escape the sandbox and run arbitrary code
vendor_redhat·2023-07-21·CVSS 9.8
CVE-2023-37903 [CRITICAL] CWE-78 vm2: custom inspect function allows attackers to escape the sandbox and run arbitrary code
vm2: custom inspect function allows attackers to escape the sandbox and run arbitrary code
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.
A flaw was found in the vm2 custom inspect function, which allows attackers to escape the sandbox. This flaw allows attackers to run arbitrary code.
Mitigation: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Sec
No detection rules found.
No public exploits indexed.
https://github.com/patriksimek/vm2/security/advisories/GHSA-g644-9gfx-q4q4https://security.netapp.com/advisory/ntap-20230831-0007/https://github.com/patriksimek/vm2/security/advisories/GHSA-g644-9gfx-q4q4https://security.netapp.com/advisory/ntap-20230831-0007/https://security.netapp.com/advisory/ntap-20241108-0002/
2023-07-21
Published