Skip to content
OpenAdvisories

Package · npm

vm2

78 known vulnerabilities.

15 results · Clear filters · Feed

  • High 7.5

    vm2 before 3.12.2 Memory Disclosure via zlib Buffer Pool

    vm2 before 3.12.2 does not apply its Buffer backing-store ownership invariant (byteOffset === 0 and buffer.byteLength === length) to Buffers returned from host builtin modules. When an application explicitly exposes Node's zlib module through NodeVM's builtin…

  • High 7.5

    vm2 before 3.11.6 Memory Exhaustion DoS via bufferAllocLimit Bypass

    vm2 before 3.11.6 fails to enforce bufferAllocLimit on ArrayBuffer, SharedArrayBuffer, and TypedArray constructors, allowing attackers to allocate arbitrary host memory. Attackers can bypass the buffer allocation cap by using these V8 intrinsics to exhaust ho…

  • High 7.1

    vm2 before 3.11.8 allowAsync Bypass via Promise Thenable

    vm2 before 3.11.8 does not fully enforce the allowAsync: false option in VM and NodeVM. While localPromise.prototype.then is replaced with a handler that throws 'Async not available', the sandbox's Promise static methods (Promise.resolve, Promise.all, Promise…

  • High 8.5

    vm2 before 3.11.7 Denylist Bypass via fs/promises

    vm2 through 3.11.6 contains a builtin-module denylist bypass in NodeVM. When the embedder uses the builtin wildcard together with negative entries (e.g. require: { builtin: ['*', '-fs', '-child_process'] }), negative entries are matched by exact module name i…

  • High 8.6

    vm2 3.10.0 through 3.11.7 Denial of Service via Host Promise

    vm2 is a sandbox library for running untrusted JavaScript in Node.js. In versions >= 3.10.0 and <= 3.11.7, Promises returned from the host realm into the sandbox are not marked as handled at the bridge boundary; only Promises created inside the sandbox are wr…

  • High 8.6

    vm2 before 3.11.7 Sandbox Escape via CLI require

    vm2 before 3.11.7 contains a sandbox escape vulnerability in the CLI tool that allows attackers to execute arbitrary code in the host Node.js process. Attackers can supply a malicious script file to the vm2 CLI that uses require(__filename) to re-execute itse…

  • High 7.5

    vm2 before 3.11.7 Timeout Bypass via FinalizationRegistry

    vm2 before 3.11.7 (affected versions <= 3.11.6) does not enforce the VM({ timeout }) option on code executed outside the synchronous VM#run() call. The timeout only wraps the single call to _runScript() via doWithTimeout() in lib/vm.js, and FinalizationRegist…

  • High 8.7

    vm2: bufferAllocLimit cap bypassed by Buffer.concat and Buffer.from arrayLike

    vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, the bufferAllocLimit enforcement in lib/setup-sandbox.js does not cover Buffer.concat(list, totalLength) or Buffer.from(arrayLike) with an attacker-controlled length, allowing sandbox code to perf…

  • High 8.6

    vm2: NodeVM network builtin exclusions bypass via internal _http_client and _http_server

    vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM supports excluding public network builtins from the wildcard builtin option. With this configuration direct access to http, https, http2, net, dgram, tls, dns, and dns/promises is b…

  • High 8.7

    vm2: Sandbox escape via unblocked cross-realm Symbol.for keys + missing bridge write-trap symbol checks

    vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, Symbol.for override in setup-sandbox.js only intercepts 2 of 9 dangerous Node.js cross-realm symbols. Combined with the bridge's set/defineProperty/deleteProperty traps having no isDangero…

  • High 8.6

    vm2: Bridge Proxy set trap ignores receiver parameter, enabling host object property injection via prototype chain

    vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the BaseHandler.set trap in bridge.js (line 1231) ignores the receiver parameter and unconditionally writes to the host target object. Per the Proxy set trap specification, when receiver !…

  • High 7.5

    vm2: Host Process OOM DoS via Buffer.alloc (Timeout Bypass)

    vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, sandboxed code can call Buffer.alloc() with an arbitrary size to allocate memory directly on the host heap. Because Buffer.alloc is a synchronous C++ native call, vm2's timeout option cannot inter…

  • High 8.6

    vm2: Sandbox Escape via Promise Constructor Unhandled Rejection (Process Crash DoS)

    vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, a sandbox escape vulnerability in vm2 v3.10.5 allows any sandboxed code to crash the host Node.js process via a single Promise constructor that triggers an unhandled rejection propagating to the h…

  • High 8.5

    vm2: NodeVM require.root bypass via symlink traversal allows sandbox escape

    vm2 is an open source vm/sandbox for Node.js. In 3.10.5, NodeVM's require.root path restriction can be bypassed using filesystem symlinks, allowing sandboxed code to load modules from outside the allowed root directory in host context. Because path validation…

  • High 8.3

    Sandbox Bypass

    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 mainM…