Skip to content
OpenAdvisories

Package · npm

vm2

78 known vulnerabilities.

12 results · Clear filters · Feed

  • Medium 6.8

    vm2 before 3.12.2 Host Process Termination via Construct Trap

    vm2 before 3.12.2 does not apply host-side Promise rejection handling in the sandbox-to-host construct trap. In BaseHandler, the apply trap calls markHostPromiseHandled() on the returned value, but the adjacent construct path returns the result of Reflect.con…

  • Medium 5.3

    vm2 before 3.11.2 Information Disclosure via Internal State

    vm2 versions before 3.11.2 fail to properly restrict access to the VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL global variable. Attackers can access this internal state object through globalThis to retrieve sensitive sandbox internals.

  • Medium 6.8

    vm2 3.11.4 through 3.11.6 Sandbox Symbol Filtering Bypass

    vm2 versions 3.11.4 through 3.11.6 incompletely filter Node.js registered internal symbols across the sandbox boundary. The extraction filters in lib/setup-sandbox.js and the cross-realm symbol checks and write traps in lib/bridge.js use a fixed list of known…

  • Medium 4.0

    vm2 3.9.6 before 3.11.7 Sandbox Bypass via Accessor Descriptor

    vm2 versions from 3.9.6 before 3.11.7 fail to properly restrict access to accessor properties on frozen objects, allowing sandboxed scripts to bypass vm.freeze() and vm.readonly() protections. Attackers can use Object.getOwnPropertyDescriptor() or __lookupSet…

  • Medium 4.2

    vm2 before 3.11.7 Module Allowlist Bypass via Prefix Matching

    vm2 before 3.11.7 contains a module allowlist bypass vulnerability in isPathAllowedForModule that uses raw string prefix matching instead of boundary-anchored comparison. Attackers can reach non-allowlisted packages sharing a prefix with allowlisted modules b…

  • Medium 5.8

    vm2 3.11.0 before 3.11.7 Information Disclosure via Error Stack

    vm2 versions 3.11.0 through 3.11.6 leak absolute host filesystem paths to sandboxed code through error stack formatting. Attacker-supplied code can force the host-realm source transformer to throw a SyntaxError (for example by calling eval with malformed sour…

  • Medium 5.8

    vm2 before 3.11.8 Information Disclosure via util.getCallSites

    vm2 is a sandbox for running untrusted Node.js code. In versions <= 3.11.7, NodeVM exposes the host `util` module to the sandbox as an unfiltered shallow copy (`Object.assign({}, util)` in `defaultBuiltinLoaderUtil`), and the deprecated `sys` builtin (an alia…

  • Medium 6.9

    vm2: NodeVM observability builtins leak host process and HTTP request data

    vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM exposes some process-wide observability builtins when they are allowed through require.builtin. The diagnostics_channel, async_hooks, and perf_hooks builtins are not blocked by the …

  • Medium 5.3

    vm2: Transformer Fast-Path Bypass Exposes Internal State Variable

    vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, vm2's code transformer has a performance optimization that skips AST analysis when the code does not contain catch, import, or async keywords. This fast-path bypass allows sandboxed code to direct…

  • Medium 5.8

    vm2: Host File Path Disclosure via Stack Trace Information Leak

    vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, vm2's CallSite wrapper class (intended as a safe wrapper for V8's native CallSite) blocks getThis() and getFunction() to prevent host object leakage, but allows getFileName() to return unsanitized…

  • Medium 6.5

    vm2: sandbox boundary bypass via host Promise resolution preserving host object identity

    vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, a sandbox boundary violation in vm2 allows host object identity to cross into the sandbox through host Promise resolution. When a host-side Promise that resolves to a host object is exposed to the…

  • Medium 5.3

    Inspect method manipulation in vm2

    vm2 is a sandbox that can run untrusted code with Node's built-in modules. In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node `inspect` method and edit options for `console.log`. As a result a threat actor can edit o…