Junglewise Threat Intelligence

CVE-2023-32313: vm2 Inspect Manipulation integrity bypass

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

Technologies: vm2 (npm). Vendors: npm.

Executive brief

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.

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

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

Related threats