CriticalGHSA-4w2j-2rg4-5mjwCVE-2022-25893

vm2 vulnerable to Arbitrary Code Execution

Published 21 Dec 2022 · Updated 8 Nov 2023

Affected package

vm2npm
Affected
<3.9.10
Fixed in
3.9.10
Update to the fixed version for your release line, for example:npm install vm2@3.9.10

Details

The package vm2 before 3.9.10 is vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the WeakMap.prototype.set method. Exploiting this vulnerability leads to access to a host object and a sandbox compromise.

Is GHSA-4w2j-2rg4-5mjw in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected vm2, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.