CVE-2026-92962: vm2 before 3.11.4 Defense Invariant Violation via setup-sandbox.js

Published Sep 17, 2026
·
Updated

vm2 is a sandbox for running untrusted JavaScript. In vm2 versions up to and including 3.11.3, the defaultSandboxPrepareStackTrace function in lib/setup-sandbox.js builds its output array using prototype-walking index assignment (lines[lines.length] = value) rather than a prototype-bypassing define-property primitive. Because this bridge-internal array is allocated in the sandbox realm, code inside the sandbox can install an accessor on Array.prototype for the relevant index; the accessor is then invoked whenever the sandbox reads error.stack (or otherwise triggers Error.prepareStackTrace), allowing sandbox code to observe and intercept each stack-trace line written by the bridge. The same pattern is used in the error-handling (catch) branch. The values written are formatted strings only, so the practical impact is limited to an information side channel and a violation of vm2's bridge-container defense invariant rather than a sandbox escape; the vendor rates the issue Low. The issue is fixed in vm2 3.11.4, which installs each entry as an own data property via Reflect.defineProperty.

Affected Software

2 affected components
vm2 vm2<=3.11.3
vm2 vm2=3.11.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade vm2 to a version that resolves this vulnerability.

    Fixed in 3.11.4

Event History

Sep 17, 2026
CVE Published
via MITRE·01:46 PM
Data Sourced
via MITRE·01:46 PM
DescriptionWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using vm2 3.11.3 or earlier to run untrusted JavaScript are exposed. The affected behavior is in the sandbox’s bridge-internal stack-trace handling, including the error-handling branch.

2

What must an attacker control to trigger it?

The attacker must be able to execute JavaScript inside the vm2 sandbox and install an accessor on Array.prototype for an index used while stack-trace lines are written. They must then cause sandbox code to read error.stack or otherwise trigger Error.prepareStackTrace.

3

Does this provide a sandbox escape?

No. The written values are formatted stack-trace strings, so the stated practical impact is an information side channel and a violation of the bridge-container defense invariant rather than a sandbox escape.

4

What is the remediation?

Upgrade to vm2 3.11.4. That version uses Reflect.defineProperty to create each stack-trace entry as an own data property, avoiding prototype-walking assignment.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203