CVE-2026-47137 vm2: GHSA-8hg8-63c5-gwmx patch bypass: nesting:true without explicit require still allows full RCE

Critical 10.0 Published Updated

Attackers can achieve remote code execution in vm2 by bypassing a security check when nesting is enabled without explicitly disabling require.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-47137?

CVE-2026-47137 is a critical code injection vulnerability in patriksimek vm2, published on 12 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the fix for GHSA-8hg8-63c5-gwmx (CVE-2023-37903) introduced a check in nodevm.js line 263 that blocks the combination nesting: true + require: false. However, the check uses strict equality (options.require === false), which is trivially bypassed by omitting the require option entirely. When require is not specified, options.require is undefined, not false. The strict equality check fails, so the security guard is skipped. Immediately after (line 280), the destructuring default require: requireOpts = false assigns requireOpts = false, producing the exact configuration the patch was designed to prevent. This issue has been patched in version 3.11.4.

Weakness: CWE-913

Which versions are affected by CVE-2026-47137?

2 open source packages ship an affected version, including vm2.

PackageAffectedFixed in
vm2 npmAll versions3.11.4
vm2 npmAll versions3.11.4

How do I fix CVE-2026-47137?

Upgrade vm2 to 3.11.4 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-47137 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47137 exists.

Sources

Also known as ECHO-a812-7996-036d, GHSA-m4wx-m65x-ghrr, MINI-9574-ffq3-c7x8, ROOT-APP-NPM-CVE-2026-47137.

Is CVE-2026-47137 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free