CVE-2026-92959: vm2: `allowAsync: false` can be bypassed through Promise thenable assimilation in VM and NodeVM
When allowAsync is set to false, vm2 is expected to reject attempts to run asynchronous code. Direct use of Promise.prototype.then is blocked, but Promise static methods still assimilate attacker-controlled thenables. Promise.resolve(thenable), Promise.all([thenable]), Promise.race([thenable]), Promise.any([thenable]), and Promise.allSettled([thenable]) can invoke the thenable’s then method in a microtask after VM.run() or NodeVM.run() has already returned.
This bypasses the documented async-execution restriction and runs outside the configured timeout, allowing sandboxed code to continue executing after the host believes execution is complete.
Confirmed variants:
VM({allowAsync:false}).run('Promise.resolve(thenable)')VM({allowAsync:false}).run('Promise.all([thenable])')VM({allowAsync:false}).run('Promise.race([thenable])')VM({allowAsync:false}).run('Promise.any([thenable])')VM({allowAsync:false}).run('Promise.allSettled([thenable])')NodeVM({allowAsync:false}).run('Promise.resolve(thenable)')
Negative cases checked:
- Direct
Promise.resolve(1).then(...)throwsVMError: Async not availablein bothVMandNodeVM. - NodeVM dangerous builtin exposure was reviewed separately and not implicated in this issue.
References
- github.com/advisories/GHSA-f8gf-w286-fmq2
- github.com/patriksimek/vm2/commit/1d1aa437a5a39b00b3de0deb3e31f751d4884f5f
- github.com/patriksimek/vm2/releases/tag/v3.11.8
- github.com/patriksimek/vm2/security/advisories/GHSA-f8gf-w286-fmq2
- nvd.nist.gov/vuln/detail/CVE-2026-92959
- www.vulncheck.com/advisories/vm2-before-3.11.8-allowasync-bypass-via-promise-thenable
Code Behaviors & Features
Detect and mitigate CVE-2026-92959 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →