# CVE-2023-32313: vm2 Inspect Manipulation integrity bypass

Source: https://junglewise.ai/threats/cve-2023-32313-vm2-inspect-manipulation-integrity-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-05-17. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2023-32313 · Severity: low · CVSS 3.1 · Published 2023-05-17

vm2 is a popular Node.js library that runs untrusted JavaScript code in an isolated sandbox environment. A vulnerability allows attackers to manipulate the console.log inspect method and modify its options, potentially altering how data is displayed or logged. While the direct impact is limited, this could be leveraged to tamper with audit logs or security-sensitive output within the sandboxed environment.

Technologies: [vm2 (npm)](https://junglewise.ai/threats/technologies/vm2). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2023-32313 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2023-32313 being exploited in the wild.

**How severe is CVE-2023-32313?** Low severity, with a CVSS score of 3.1, published 17 May 2023.

**Which products and versions are affected?** vm2 (npm) SEMVER:introduced=0,fixed=3.9.18.

**Is there a fix for CVE-2023-32313?** Yes. vm2 (npm): upgrade to 3.9.18 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-32313 attacked?** It is attacked over the network.

**Am I affected by CVE-2023-32313?** 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.18 or later

  ```sh
  npm install vm2@3.9.18
  ```


## Technical details

vm2 versions 3.9.17 and earlier fail to properly protect the Node.js inspect method from modification, allowing code running inside the sandbox to obtain a read-write reference and alter console.log options. The vulnerability is classified as an Improper Input Validation (CWE-74) issue affecting the sandbox isolation boundary. Attack requires only network access and no authentication or user interaction, as any code executing within the vm2 sandbox can trigger the manipulation. An attacker can modify inspection behavior to obfuscate logs or bypass output filtering, compromising the integrity of logging mechanisms. The vulnerability was patched in version 3.9.18; a temporary workaround involves calling vm.readonly(inspect) after creating the virtual machine instance.

## Affected products

- Patrik Simek vm2 3.9.17 and earlier

## Identifiers

- CVE-2023-32313
- GHSA-p5gc-c584-jj6v

## Timeline

- 2023-05-15: disclosed: CVE-2023-32313 published on NVD
- 2023-05-17: disclosed: GHSA-p5gc-c584-jj6v published
- 2023-05-17: patched: vm2 version 3.9.18 released with fix

## References

- [https://github.com/patriksimek/vm2/security/advisories/GHSA-p5gc-c584-jj6v](https://github.com/patriksimek/vm2/security/advisories/GHSA-p5gc-c584-jj6v)

## Related threats

- [vm2 NodeVM path bypass in custom resolution](https://junglewise.ai/threats/duplicate-advisory-vm2-nodevm-custom-resolution-bypasses-external-path-5d3a7272)
- [vm2 NodeVM zlib buffer pool information disclosure](https://junglewise.ai/threats/duplicate-advisory-vm2-nodevm-zlib-buffers-expose-pooled-host-memory-6007c734)
- [vm2 host Promise rejection denial of service in construct trap](https://junglewise.ai/threats/duplicate-advisory-vm2-host-promise-rejection-from-an-exposed-f7aba6ba)
- [vm2 sandbox escape via Buffer backing-store ownership bypass](https://junglewise.ai/threats/cve-2026-100723-vm2-before-3-12-2-does-not-apply-its-buffer-backing-store)
- [vm2 unhandled Promise rejection in construct trap](https://junglewise.ai/threats/cve-2026-100722-vm2-before-3-12-2-does-not-apply-host-side-promise-rejection)
