Описание
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 sandbox, the value delivered to the sandbox .then() callback preserves host identity. This allows the sandbox to interact with the host object directly, including performing identity checks using host-side WeakMap and mutating host object state from inside the sandbox. This behavior occurs because the Promise fulfillment wrapper uses ensureThis() instead of the stronger cross-realm conversion path (from() / proxy wrapping). If no prototype mapping is found, ensureThis() returns the original object. As a result, objects resolved by host Promises can cross the sandbox boundary without proper isolation. This vulnerability is fixed in 3.11.0.
A flaw was found in vm2 (before 3.11.0). Host-side Promises that resolve to host objects deliver values to sandbox .then() callbacks without cross-realm conversion (ensureThis() instead of from()/proxy wrapping), allowing sandbox code to interact with host objects directly. Fixed in 3.11.0.
Отчет
vm2 is vulnerable to sandbox boundary violation when host Promises resolve host objects into sandbox callbacks, enabling direct host object interaction and limited confidentiality/integrity impact. A remote unauthenticated attacker who can run sandboxed code and trigger host Promise resolution may read or mutate host object state. Fixed in vm2 3.11.0.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Developer Hub | rhdh/rhdh-hub-rhel9 | Not affected | ||
| Self-service automation portal 2 | ansible-automation-platform/automation-portal | Affected |
Показывать по
Дополнительная информация
Статус:
6.5 Medium
CVSS3
Связанные уязвимости
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 sandbox, the value delivered to the sandbox .then() callback preserves host identity. This allows the sandbox to interact with the host object directly, including performing identity checks using host-side WeakMap and mutating host object state from inside the sandbox. This behavior occurs because the Promise fulfillment wrapper uses ensureThis() instead of the stronger cross-realm conversion path (from() / proxy wrapping). If no prototype mapping is found, ensureThis() returns the original object. As a result, objects resolved by host Promises can cross the sandbox boundary without proper isolation. This vulnerability is fixed in 3.11.0.
vm2 Host Promise Resolution Preserves Object Identity Across Sandbox Boundary
Уязвимость файла setup-sandbox.js библиотеки vm2 пакетного менеджера NPM, позволяющая нарушителю выполнить произвольный код
6.5 Medium
CVSS3