CVE-2026-47210:
JavaScript 취약성 분석 및 완화
개요
CVE-2026-47210 is a critical sandbox escape vulnerability in vm2, an open-source Node.js VM/sandbox library, that allows arbitrary code execution in the host process. It affects all versions up to and including 3.11.3 (i.e., < 3.11.4) and was first published by the maintainer on May 18, 2026, with the GitHub Advisory Database entry published May 29, 2026 and NVD publication on June 12, 2026. The vulnerability is classified as Critical with a CVSS v3.1 base score of 9.8 (Github Advisory, GitHub Security Advisory). The issue was reported by security researcher RealHurrison (Github Advisory).
기술적 세부 사항
The root cause is classified as CWE-913 (Improper Control of Dynamically-Managed Code Resources). The vulnerability arises because WebAssembly.promising() in Node.js 26+ (and Node 24 with --experimental-wasm-jspi) returns Promise objects whose [[Prototype]] chain points directly at the host realm's Promise.prototype without any bridge proxy interposition — bypassing vm2's sandbox-side Promise overrides and resetPromiseSpecies hardening (GitHub Security Advisory, Patch Commit). An attacker installs a custom constructor getter on the JSPI-backed Promise, causing p.finally() to invoke host Promise.prototype.finally; V8's SpeciesConstructor then reads the attacker-controlled class F, and the eventual host-realm TypeError rejection is dispatched through F's reject closure with no bridge mediation, allowing e.constructor.constructor('return process')() to evaluate in the host realm (GitHub Security Advisory). A public proof-of-concept is included in the advisory and requires only that the target application uses vm2 with async support on a Node.js runtime exposing WebAssembly JSPI (Node 26+ by default) (Github Advisory).
영향
Successful exploitation results in complete compromise of the host process: an attacker can execute arbitrary operating system commands, read and write arbitrary files accessible to the host process, and steal secrets, tokens, credentials, and application data (GitHub Security Advisory). Any application that relies on vm2 as a security boundary — such as code execution platforms, online IDEs, or multi-tenant SaaS services — is fully compromised, with high confidentiality, integrity, and availability impact. The attack requires no authentication and no user interaction, making it particularly severe for internet-facing services that accept and execute user-supplied JavaScript (Github Advisory).
착취 단계
- Identify target: Locate an application that uses vm2 (npm package) as a sandbox for executing untrusted JavaScript, running on Node.js 26+ (where WebAssembly JSPI is enabled by default) or Node.js 24 with
--experimental-wasm-jspi. - Craft malicious WebAssembly module: Prepare a minimal WASM binary that imports a JS function wrapped with
WebAssembly.Suspending, causing a host-realmTypeErrorduring JSPI processing. - Instantiate WASM and obtain JSPI Promise: Inside the vm2 sandbox, call
WebAssembly.instantiate(wasmBytes, {m:{f: new WebAssembly.Suspending(...)}}), then invoke the exported function viaWebAssembly.promising(r.instance.exports.run)()to obtain a JSPI-backed Promisepwhose[[Prototype]]is the host realm'sPromise.prototype. - Install attacker-controlled species: Define a custom class
Fwith a constructor that captures the reject callback. SetObject.defineProperty(F, Symbol.species, {get(){return F}})andObject.defineProperty(p, 'constructor', {get(){return F}})to redirect V8'sSpeciesConstructorlookup toF. - Trigger
.finally()to reach host realm: Callp.finally(()=>{}). This invokes hostPromise.prototype.finally, which usesSpeciesConstructorto callnew F(...), storing sandbox closures as raw[[Resolve]]/[[Reject]]with no bridge mediation. - Execute arbitrary code in host: When the host-realm
TypeErrorrejection is dispatched toF's reject closure, usee.constructor.constructor('return process')()to obtain the hostprocessobject, then callprocess.mainModule.require('child_process').execSync('<command>')to execute arbitrary OS commands (GitHub Security Advisory, Patch Commit).
타협의 징후
- Process: Unexpected child processes spawned by the Node.js process running vm2 (e.g.,
sh,bash,cmd.exe, or other shells); calls toexecSync,exec, orspawnoriginating from within a vm2 sandbox context. - File System: Unexpected files created or modified by the Node.js service account (e.g., a
pwnedfile as demonstrated in the PoC); new scripts, binaries, or cron jobs written by the application process. - Logs: Application logs showing WebAssembly instantiation or
WebAssembly.promising/WebAssembly.Suspendingusage within sandboxed code; Node.js unhandled rejection or TypeError stack traces involvingPromise.prototype.finallyand cross-realm constructor chains. - Network: Unexpected outbound connections from the Node.js host process to external IPs (indicative of reverse shell or data exfiltration following sandbox escape) (GitHub Security Advisory).
완화 및 해결 방법
Upgrade vm2 to version 3.11.4 or later, which removes WebAssembly.promising and WebAssembly.Suspending from the sandbox at bootstrap, eliminating the JSPI attack surface (vm2 Release, Patch Commit). As a temporary workaround prior to patching, disable async support and WebAssembly JSPI in the runtime (avoid Node.js 26+ or use --no-experimental-wasm-jspi on Node 24), or avoid executing untrusted code in vm2 entirely until the patch is applied. Applications relying on vm2 as a security boundary in high-risk environments should evaluate alternative sandboxing solutions given vm2's history of sandbox escapes (Github Advisory).
커뮤니티 반응
The vulnerability received coverage from Heise Online, which reported on four critical security gaps with maximum ratings closed in vm2 (Heise). Security news aggregator SecurityOnline.info also covered the vm2 sandbox escape vulnerabilities in the context of Node.js RCE risks. The broader security community noted that vm2 has a long history of sandbox escapes, reinforcing concerns about using it as a hard security boundary in production environments.
추가 자료
근원: 이 보고서는 AI를 사용하여 생성되었습니다.
관련 JavaScript 취약점:
무료 취약성 평가
클라우드 보안 태세를 벤치마킹합니다
9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.
추가 Wiz 리소스
맞춤형 데모 받기
맞춤형 데모 신청하기
"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."