Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.
Start learningUpgrade vm2 to version 3.11.6 or higher.
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules.
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via sandbox escape through cross-realm Node.js internal symbol injection. In lib/bridge.js and lib/setup-sandbox.js, the isDangerousCrossRealmSymbol check and the Symbol.for override previously covered only a subset of dangerous nodejs.* symbols (util.inspect.custom, rejection, and util.promisify.custom), leaving seven additional Node-internal symbols accessible to sandbox code. An attacker can install these symbols on host-realm objects exposed to the sandbox, hijacking host-side control flow through Node's duck-typing checks and internal hooks (e.g., via util.promisify hijack or stream brand spoofing), ultimately causing a denial of service or potentially achieving sandbox escape.