Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. vm2
  4. ›
  5. GHSA-q3fm-4wcw-g57x

GHSA-q3fm-4wcw-g57x: vm2 setup-sandbox.js violates Defense Invariant #11 in stack-trace formatter

May 29, 2026

defaultSandboxPrepareStackTrace in lib/setup-sandbox.js (lines 605, 607) appends to a fresh sandbox-realm lines = [] via lines[lines.length] = value. This is the exact invariant-violating pattern that GHSA-9qj6-qjgg-37qq (commit ca195f0, 2026-05-01) just patched in neutralizeArraySpeciesBatch and codified as Defense Invariant #11 (“Bridge-internal containers must not invoke sandbox code”). A sandbox-installed Array.prototype[N] setter fires during the bridge’s safe-default stack-trace formatting and observes / intercepts each appended line.

References

  • github.com/advisories/GHSA-q3fm-4wcw-g57x
  • github.com/patriksimek/vm2/commit/ad31adc1fc4a2c163f2f8c11ab4af206074528fd
  • github.com/patriksimek/vm2/releases/tag/v3.11.4
  • github.com/patriksimek/vm2/security/advisories/GHSA-q3fm-4wcw-g57x

Code Behaviors & Features

Detect and mitigate GHSA-q3fm-4wcw-g57x with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.11.4

Fixed versions

  • 3.11.4

Solution

Upgrade to version 3.11.4 or above.

Impact 2.9 LOW

CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-693: Protection Mechanism Failure

Source file

npm/vm2/GHSA-q3fm-4wcw-g57x.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 30 May 2026 12:16:54 +0000.