All vulnerabilities
CVE-2026-92947GHSA-fcqc-726x-5wfc

vm2: Sandboxed code can read and write host-realm memory via Node's shared Buffer pool

patriksimek vm2npmLibraries & packages
CVSS
10.0Critical
ExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 17 Sep 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.48%Chance of exploitation activity in the next 30 days, higher than 40% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in3.11.7Fixed versionGitHub
Published17 Sep 2026Updated 5 Oct 2026CVE List

What fixes it

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Summary

Sandboxed code is able to disclose host memory used by small allocations by Buffer.from, Buffer.concat.

Details

vm2 exposes Buffer object to sandboxed code by default. Small [Buffer allocations](https://nodejs.org/api/buffer.html#static-method-bufferallocunsafesize) (for example, Buffer.allocUnsafe(), Buffer.from(array), Buffer.from(string), and Buffer.concat()) use the same Buffer pool, which is shared with the sandbox. This allows sandboxed code to disclose host memory used by the functions listed above.

PoC

Tested against vm2@3.11.5 in the node REPL.

Buffer.from('host-memory-should-not-leak-to-sandbox')
new (require('vm2').VM)().run(`Buffer.from(Buffer.from([0]).buffer, 0, Buffer.from([0]).buffer.byteLength).toString('ascii')`)

<img width="1044" height="104" alt="Screenshot 2026-07-23 at 17 54 15" src="https://github.com/user-attachments/assets/987b860c-6702-4818-bfaa-c77919c777e5" />

Impact

Since sandbox acquires an ArrayBuffer that is used by the host, it can disclose sensitive data going through functions mentioned above and even write to these buffers, which can lead to sensitive data exposure and potentially denial-of-service.

Text from GitHub Advisory Database

Affected versions 4

  • vm2, npm<= 3.11.6GitHub
  • vm2affected: all versions before 3.11.7CVE List
  • vm2unaffected: 3.11.7CVE List
  • vm2, npmfrom first release, fixed in 3.11.7OSV

References 6