CVE-2026-47683: vm2 Buffer Allocation Limit Bypass Vulnerability

vm2 Updated 17 Aug 2026

Summary

17/08/2026
Yes i
High
8.7

CVE-2026-47683: vm2's bufferAllocLimit cap bypassed by Buffer.concat and Buffer.from arrayLike. Affects vm2 versions < 3.11.6. Fixed in 3.11.6. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

vm2 is a popular Node.js package that provides a sandboxed environment for executing untrusted code securely. It allows developers to run code in a controlled manner, limiting access to the host environment. However, a recent vulnerability has been identified that allows attackers to bypass the buffer allocation limit, potentially leading to Denial of Service (DoS) attacks.

Vulnerability Detail

The vulnerability arises from the bufferAllocLimit feature introduced in version 3.11.0, which is intended to cap host-side Buffer allocations driven by sandbox code. However, the methods Buffer.concat(list, totalLength) and Buffer.from(arrayLike) with a fake length are not capped, allowing attackers to allocate arbitrary amounts of memory. This can lead to significant memory consumption and potentially crash the host process, especially in environments with strict memory limits like Docker or AWS Lambda. The vulnerability is classified as high severity with a CVSS score of 8.7.

How To Fix

Latest published version: 3.12.2 as of 22 Oct 2026

npm install vm2@3.12.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.11.6

This is the first release that contains the fix.

npm install vm2@3.11.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using Buffer.concat and Buffer.from with array-like objects that have a numeric length in your sandboxed code until you can update to the patched version. Instead, use alternative methods for buffer allocation that respect the bufferAllocLimit.

Conclusion

The vm2 package has a significant vulnerability that allows attackers to bypass buffer allocation limits, leading to potential Denial of Service attacks. It is crucial to update to version 3.11.6 or later to mitigate this risk. Additionally, using tools like Vulert can help monitor and manage vulnerabilities in your applications effectively.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

The vulnerability allows untrusted sandbox code to allocate excessive amounts of memory, potentially leading to Denial of Service (DoS) by exhausting system resources.

You can use Vulert to monitor your application for vulnerabilities. By analyzing your package-lock.json file, Vulert can alert you to any open-source vulnerabilities in real-time.

Environments with strict memory limits, such as Docker containers, Kubernetes pods, and serverless platforms like AWS Lambda, are particularly vulnerable to this issue.

While the best solution is to update to the patched version, you can temporarily avoid using the vulnerable methods in your sandboxed code as a workaround.

The CVSS score for this vulnerability is 8.7, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for vm2.

How To Fix

Latest published version: 3.12.2 as of 22 Oct 2026

npm install vm2@3.12.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.11.6

This is the first release that contains the fix.

npm install vm2@3.11.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback