Critical

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

  • Disclosed: 05.10.2026
  • Updated: 11.10.2026 10:22

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 (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.

js
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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package vm2 < 3.11.7 3.11.7

References

CVSS score 10/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
Weakness (CWE)
CWE-200, CWE-653, CWE-668
Platform
npm
Package
vm2
Disclosed
05.10.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-fcqc-726x-5wfc - CC BY 4.0

Vulnerability history: vm2

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (78) in the archive
Total entries
78
First → latest
10.2021 10.2026
Without a fix
1
Exploited in attacks
0

Severity breakdown

  • Critical 51
  • High 14
  • Medium 12
  • Low 1

Disclosures per year

  1. 2021: 1
  2. 2022: 4
  3. 2023: 7
  4. 2024: 0
  5. 2025: 0
  6. 2026: 66
Severity:
  1. Critical · 10.0 CVE-2026-93605 < 3.12.1 3.12.1
  2. Critical · 10.0 CVE-2026-100721 < 3.12.2 3.12.2
  3. Critical · 10.0 CVE-2026-92955 < 3.11.8 3.11.8
  4. vm2: Sandboxed code can read and write host-realm memory via Node's shared Buffer pool this entry
    Critical · 10.0 CVE-2026-92947 < 3.11.7 3.11.7
  5. Critical · 10.0 CVE-2026-92956 >= 3.10.1, < 3.11.7 3.11.7
  6. Critical · 9.9 CVE-2026-92948 >= 3.9.6, < 3.11.7 3.11.7
  7. Critical · 10.0 CVE-2026-92940 >= 3.11.3, < 3.11.7 3.11.7
  8. Critical · 9.0 CVE-2026-92935 >= 3.11.4, < 3.11.7 3.11.7
  9. Critical · 10.0 CVE-2026-92937 >= 3.11.6, < 3.11.7 3.11.7
  10. Critical · 9.9 CVE-2026-92938 >= 3.11.3, < 3.11.7 3.11.7
  11. Critical · 9.9 CVE-2026-92939 >= 3.11.3, < 3.11.7 3.11.7
  12. Critical · 9.8 CVE-2026-92944 >= 3.10.2, < 3.11.7 3.11.7
  13. Critical · 10.0 CVE-2026-92941 >= 3.11.3, < 3.11.7 3.11.7
  14. High · 7.5 CVE-2026-92961 < 3.11.6 3.11.6
  15. Critical · 9.8 CVE-2026-47698 < 3.11.6 3.11.6
  16. Critical · 9.8 CVE-2026-47210 < 3.11.4 3.11.4
  17. Critical · 10.0 CVE-2026-47208 < 3.11.4 3.11.4
  18. Critical · 10.0 CVE-2026-47131 < 3.11.4 3.11.4
  19. Critical · 9.8 CVE-2026-45411 < 3.11.3 3.11.3
  20. Critical · 9.8 CVE-2026-44009 < 3.11.2 3.11.2
  21. Critical · 9.8 CVE-2026-44008 < 3.11.2 3.11.2
  22. Critical · 10.0 CVE-2026-44005 >= 3.9.6, < 3.11.0 3.11.0
  23. Critical · 10.0 CVE-2026-43997 < 3.11.0 3.11.0
  24. Critical · 10.0 CVE-2026-44006 < 3.11.0 3.11.0
  25. Critical · 9.8 CVE-2026-26956 < 3.10.5 3.10.5
  26. Critical · 9.8 CVE-2026-26332 < 3.11.0 3.11.0
  27. Critical · 9.8 CVE-2026-24781 < 3.11.0 3.11.0
  28. Critical · 9.8 CVE-2026-24120 < 3.10.5 3.10.5
  29. Critical · 9.8 CVE-2026-24118 < 3.11.0 3.11.0
  30. Critical · 9.8 CVE-2026-22709 < 3.10.2 3.10.2
  31. Critical · 9.8 CVE-2023-37466 < 3.10.0 3.10.0
  32. Critical · 9.8 CVE-2023-37903 <= 3.9.19 no fix
  33. Critical · 9.8 CVE-2023-32314 < 3.9.18 3.9.18
  34. Critical · 9.8 CVE-2023-30547 < 3.9.17 3.9.17
  35. Critical · 9.8 CVE-2023-29199 < 3.9.16 3.9.16
  36. Critical · 9.8 CVE-2023-29017 < 3.9.15 3.9.15
Show more (5) Showing 60 of 65

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.