# Soketi sandbox escape via vm2

Source: https://junglewise.ai/threats/soketi-sandbox-escape-via-vm2-ca5f83ea  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-08-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: low · CVSS 3.1 · Published 2023-08-03

Soketi is an open-source WebSocket server that enables real-time communication for web applications. A vulnerability in its use of the vm2 code sandbox library allows attackers to escape the sandbox and execute arbitrary code on the server. Any deployment using Soketi with the cluster driver or PM2 process manager is affected and could result in complete system compromise.

Technologies: [@soketi/soketi (npm)](https://junglewise.ai/threats/technologies/soketi-soketi), [Soketi](https://junglewise.ai/threats/technologies/soketi). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Soketi](https://junglewise.ai/threats/vendors/soketi).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 3.1, published 3 August 2023.

**Which products and versions are affected?** @soketi/soketi (npm) SEMVER:introduced=0,fixed=1.6.0; Soketi prior to 1.6.0.

**Is there a fix for This vulnerability?** Yes. @soketi/soketi (npm): upgrade to 1.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network.

**Am I affected?** Check whether you run @soketi/soketi (npm) or Soketi 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

- @soketi/soketi (npm): upgrade to 1.6.0 or later

  ```sh
  npm install @soketi/soketi@1.6.0
  ```


## Technical details

The vulnerability is a code injection issue (CWE-94) stemming from insufficient input neutralization in Soketi's use of the vm2 sandboxing library. The vm2 library, which Soketi relies on to safely execute user-supplied code, contains multiple known sandbox escape vectors that allow attackers to break out of the restricted execution environment. The vulnerability is exploitable remotely over the network without authentication or user interaction required. An attacker can leverage this to execute arbitrary code with the privileges of the Soketi process, potentially gaining full control of the system. The issue has been patched in Soketi 1.6.0 and later; affected users should upgrade immediately.

## Affected products

- Soketi Soketi prior to 1.6.0

## Timeline

- 2023-08-03: disclosed

## References

- [https://github.com/soketi/soketi/security/advisories/GHSA-g6w6-h933-4rc5](https://github.com/soketi/soketi/security/advisories/GHSA-g6w6-h933-4rc5)
- [https://github.com/Unitech/pm2/issues/5643](https://github.com/Unitech/pm2/issues/5643)

## Related threats

- [Soketi denial of service via malicious colors.js dependency](https://junglewise.ai/threats/soketi-denial-of-service-via-malicious-colors-js-dependency-607da661)
- [soketi denial of service via empty POST request](https://junglewise.ai/threats/cve-2022-21667-soketi-denial-of-service-via-empty-post-request)
