upatch.dev

CVE-2026-92937

vm2 3.11.6 Remote Code Execution via Promise call/apply

Refuses subprocess execution from Node.js processes to mitigate the vm2 sandbox escape CVE-2026-92937.

Critical 10.0Vetted

EPSS 1.0%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.

At a glance

CVE-2026-92937 is a critical (CVSS 10.0) vulnerability in vm2, published 17 September 2026. A vetted upatch, cve-2026-92937-exec-block, blocks it on running Linux machines with shirudo until vm2 is upgraded.

Severity
Critical 10.0 CVSS 4.0
Chance of exploitation
1.0% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-94
Affected software
vm2 (patriksimek)
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-92937 (GHSA-647f-g98j-qq25), published on 17 September 2026, is a sandbox escape in vm2 3.11.6 that leads to remote code execution in the host Node.js process. It is an incomplete fix for GHSA-m283-3h24-438v: the bridge gate at lib/bridge.js:1624 identity-checks only the direct call target when deciding whether to rebuild and sanitize a rejected host Promise value. Registering the rejection handler through Function.prototype.call or .apply indirection (p.then.call(p, undefined, cb)) makes the intercepted target the host's Function.prototype.call, so the sanitizer never runs and the raw host error reaches sandbox code (lib/bridge.js:1639) with its own properties intact. When an embedder-exposed host-realm Promise rejects with an Error carrying a property that references a host object such as process, sandbox code receives a working proxy to it and can load child_process (e.detail.mainModule.require('child_process').execSync(...)) to execute arbitrary commands on the host.

Official description

vm2 3.11.6 is vulnerable to a sandbox escape leading to remote code execution in the host Node.js process. The fix for GHSA-m283-3h24-438v is incomplete: the bridge gate at lib/bridge.js:1624 identity-checks only the direct call target when deciding whether to rebuild/sanitise a rejected host Promise value. Registering the rejection handler through Function.prototype.call or .apply indirection (e.g., p.then.call(p, undefined, cb)) makes the intercepted target host Function.prototype.call, so the sanitiser never runs and the raw host error reaches sandbox code with its own properties intact. If an embedder exposes a host-realm Promise to the sandbox (an async host function bridged via the sandbox option, or a NodeVM external module's async method) and that Promise rejects with an Error carrying a non-primitive own property referencing a host object (for example err.detail = process), untrusted code in the sandbox obtains a fully functional proxy to that host object and can execute arbitrary commands with the privileges of the host process (e.g., e.detail.mainModule.require('child_process').execSync(...)). The direct p.then(undefined, cb), bind, and Reflect.apply forms are correctly sanitised. Fixed in vm2 3.11.7.

Affected versions

vm2 (npm):

Affected Fixed in
<= 3.11.6 3.11.7

Affected kernels: N/A (application vulnerability in vm2; the upatch runs on any Linux kernel supported by shirudo with BPF_LSM).

Sources

More references from NVD (2)

Mitigation

It attaches to lsm/bprm_check_security and returns -EPERM when the calling task's executable (mm->exe_file) or command name (comm) is node. When Node.js spawns a child process (child_process.execSync, execFileSync, spawn, exec), it forks a child whose executable and command name are still node when execve runs security_bprm_check(). Refusing that step causes the spawn to fail with EPERM before the target program is loaded. A refusal from an earlier BPF LSM program on the same hook is passed on unchanged, and the refused per-CPU array counts refused executions at key 0.

Side effects

  • Any node process on the machine is unable to execute child programs (child_process.spawn, exec, execFile, execSync, execFileSync fail with EPERM).
  • Pure JavaScript execution inside vm2 and the host Node.js application, network I/O, and file operations continue to work.
  • Other processes on the machine, including root shells, sshd, and package managers, can execute programs normally; starting /usr/bin/node from another process remains allowed because the parent's executable is not node.
  • Not covered: in-process post-exploitation inside the Node.js process that does not spawn an external binary (fs reads or writes, network connections), or a Node.js binary renamed to something other than node that also changes its comm before calling execve.

Preemption model and cost

The program shares only a single-entry per-CPU counter (refused), updated with an atomic fetch-and-add only when an execve from node is refused, so it is safe under every preemption model, including PREEMPT_LAZY, preemptible RCU, and PREEMPT_RT. The hook runs only on execve, never on I/O or syscall hot paths, and non-node processes return after checking the four-byte executable dentry length and comm.

The policy

70 lines of BPF C, attached at lsm/bprm_check_security.

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>

#define EPERM	1

char _license[] SEC("license") = "Dual BSD/GPL";

struct {
	__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
	__uint(max_entries, 1);
	__type(key, __u32);
	__type(value, __u64);
} refused SEC(".maps");

static __always_inline bool dentry_is_node(const struct dentry *dentry)
{
	const unsigned char *name;
	char buf[5] = {};

	if (!dentry || BPF_CORE_READ(dentry, d_name.len) != 4)
		return false;
	name = BPF_CORE_READ(dentry, d_name.name);
	if (!name || bpf_probe_read_kernel(buf, 4, name))
		return false;
	return buf[0] == 'n' && buf[1] == 'o' && buf[2] == 'd' && buf[3] == 'e';
}

static __always_inline bool comm_is_node(void)
{
	char comm[16] = {};

	if (bpf_get_current_comm(comm, sizeof(comm)))
		return false;
	return comm[0] == 'n' && comm[1] == 'o' && comm[2] == 'd' &&
	       comm[3] == 'e' && comm[4] == '\0';
}

static __always_inline bool current_is_node(void)
{
	struct task_struct *task = bpf_get_current_task_btf();
	const struct dentry *exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);

	return dentry_is_node(exe) || comm_is_node();
}

static __always_inline int earlier_verdict(int ret)
{
	return ret >= -4095 && ret < 0 ? ret : -EPERM;
}

SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_92937_exec_block, struct linux_binprm *bprm, int ret)
{
	__u32 key = 0;
	__u64 *value;

	if (ret)
		return earlier_verdict(ret);
	if (!current_is_node())
		return 0;
	value = bpf_map_lookup_elem(&refused, &key);
	if (value)
		__sync_fetch_and_add(value, 1);
	return -EPERM;
}

Process

How this upatch was written, checked and reviewed, from the registry’s history.

  1. 17 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #29 openedAdd CVE-2026-92937: Refuses subprocess execution from Node.js processes to mitigate the vm2 sandboxromanlab
  3. 25 Nov 2026MergeMerged #29romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

No human review is recorded on GitHub for this upatch yet.

Evidence

On vm2 3.11.6 running on Node.js, the loaded upatch refused child process execution from the escaped sandbox with EPERM while normal vm2 evaluation continued to work.

Tested
25 Nov 2026
Target
vm2 3.11.6 on Node.js with a bridged async host function rejecting with a host reference, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Machine
shirudo test VM
Distribution
Ubuntu 26.04
Results
StateChild command execution from escaped vm2 sandboxNormal vm2 evaluation
Before loadingyesyes
Upatch loadedno (EPERM)yes
After unloadingyesyes
tools-test.log Output of tools/test --setup showing the probe reaching child execution before and after the upatch and being refused with EPERM while loaded.
tools/test --setup, 2026-11-25T11:24:28Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-92937
  setup   done         VM2_URL=http://127.0.0.1:18080
  before  reached      escaped vm2 sandbox via Promise.then.call and ran /bin/true, normal vm2 evaluation works
  loaded  blocked      child_process execution failed with EPERM, normal vm2 evaluation works
  after   reached      escaped vm2 sandbox via Promise.then.call and ran /bin/true, normal vm2 evaluation works
  PASS: reached before, blocked while loaded, reached again after

Use it

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-92937
Publish and roll out
shirudo bpm push build/packages/cve-2026-92937-1.0.0.bee oci://<registry>/<namespace>/cve-2026-92937 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-92937-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>