vm2 — это песочница для запуска ненадежного кода Node.js. 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 alias of host `util`) is exposed through the generic builtin loader. На Node.js 22.9 этот код в песочнице util.getCallSites(), программный стек-интроспекция API, который возвращает полный стек вызовов хост-процесса, включая абсолютные пути файлов, имена функций и номера строк для внутренних элементов моста vm2 и точки входа приложения для встраивания.
Это обходит редакцию хост-кадра, введенную для GHSA-v27g-c-v8rw, которая применяется только к каналу форматирования Error.prepareStackTrace. Проблема исправлена в vm2 3.11.8.
Показать оригинальное описание (EN)
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 alias of host `util`) is exposed through the generic builtin loader. On Node.js >= 22.9 this hands sandboxed code `util.getCallSites()`, a programmatic stack-introspection API that returns the host process's full call stack, including absolute file paths, function names, and line numbers for vm2 bridge internals and the embedding application's entrypoint. This bypasses the host-frame redaction introduced for GHSA-v27g-jcqj-v8rw, which only applies to the `Error.prepareStackTrace` formatting channel. The issue is fixed in vm2 3.11.8.
Характеристики атаки
Последствия
Строка CVSS v4.0