Improper authorization control for web services In vm2
Description
vm2 has a Sandbox Escape issue
Summary
By combining Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__"), Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox.
This allows attackers to run arbitrary code.
PoC
"use strict"; const { VM } = require("vm2"); const vm = new VM(); vm.run(` "use strict"; ...
Impact
Sandbox Escape → RCE
Mitigation
Update Impact
Minimal update. May introduce new vulnerabilities or breaking changes.
Ecosystem | Component | Affected version | Patched versions |
|---|---|---|---|
npm | 3.11.4 |
Aliases
1. 2. 3. 4. 5.
References
1. 2. 3.