CVE-2019-10761 Sandbox Bypass

High 8.3 Published Updated

Attackers can bypass the vm2 sandbox via stack overflow to access host modules and execute arbitrary code on the server.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-10761?

CVE-2019-10761 is a high-severity code injection vulnerability in vm2, published on 13 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-674

Which versions are affected by CVE-2019-10761?

2 open source packages ship an affected version, including vm2. It affects 1 product.

PackageAffectedFixed in
vm2 npmAll versions3.6.11
vm2 npmAll versions3.6.11

Products include Vm2 Project Vm2.

How do I fix CVE-2019-10761?

Upgrade vm2 to 3.6.11 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2019-10761 being exploited?

There is no known exploitation of CVE-2019-10761 in the wild and no public exploit code.

Sources

Also known as GHSA-wf5x-cr3r-xr77, SNYK-JS-VM2-473188.

Is CVE-2019-10761 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free