Skip to content

← Actionable
High, CVSS 7.5

vm2 has Memory Exhaustion DoS via bufferAllocLimit Bypass

GHSA-v836-6xw4-9cx3

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (vm2 3.11.6), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm vm2

    Affected
    <= 3.11.5
    Fixed in
    3.11.6

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

Summary: The bufferAllocLimit defense (GHSA-6785-pvv7-mvg7) can be completely bypassed using ArrayBuffer, SharedArrayBuffer, or any TypedArray constructor. These allocate identical host-process RSS through the same V8/libuv C++ allocation path as Buffer.alloc but are not subject to the size cap. Details: The bufferAllocLimit option (vm2 v3.11.0+) caps Buffer.alloc, Buffer.allocUnsafe, Buffer.allocUnsafeSlow, and the deprecated Buffer(N) / new Buffer(N) forms. The cap is enforced in setup-sandbox.js via checkBufferAllocLimit() (line 353-359). However, ArrayBuffer, SharedArrayBuffer, Uint8Array, Float64Array, and all other TypedArray constructors are sandbox-realm V8 intrinsics that allocate host memory through the SAME underlying C++ path (v8::ArrayBuffer::NewBackingStore → ArrayBufferAllocator::Allocate → calloc/malloc). These constructors are NOT intercepted by the bufferAllocLimit defense. A single new ArrayBuffer(N) call with a large N exhausts host RSS in one synchronous…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-v836-6xw4-9cx3

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-v836-6xw4-9cx3

Advisory: vm2 has Memory Exhaustion DoS via bufferAllocLimit Bypass
IDs: GHSA-v836-6xw4-9cx3
Record: https://patchnext.com/advisories/ghsa-v836-6xw4-9cx3 (revision 1, source checked 26 Oct 2026, 13:01 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: vm2 3.11.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm vm2: affected <= 3.11.5; fixed in 3.11.6

## Suggested inspection (read-only)
- `npm ls vm2 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on vm2.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-v836-6xw4-9cx3 (GitHub-reviewed advisory GHSA-v836-6xw4-9cx3 lists affected ranges: npm vm2 >=0 <=3.11.5)

Commands are suggestions: review each one before running it.

Loading voting…