vm2 is vulnerable to Remote Code Execution
99
Critical Risk
The allowlist pre-check for require.external combined with a custom resolve callback validates package names with a non-anchored regular expression, matching a substring rather than the full name. Sandboxed code requests a package whose name contains an allowlisted name as a substring, so the resolver loads an unauthorized host package. Loading the colliding package can execute arbitrary code in the host context. The fix enforces exact-match validation of the external allowlist.
You are affected if you are using a version that falls within the vulnerable range and you use require.external with a custom module resolver and allowlist.
vm2 is vulnerable to Remote Code Execution in versions 0.0.1 - 3.11.6.
Upgrade the vm2 library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant