CVE-2026-24118
criticalpriority · track · 10EPSS 0.009 · 59 %ileexploit · PoCDEEURUUSEPSS · scored 2026-10-21
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This issue has been patched in version 3.11.0.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (1)
Public proof-of-concept and weaponised exploit code.
- HORKimhab/CVE-2026-24118HORKimhab/CVE-2026-24118PoC · poc_in_github
affected products (8)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2026-1349vm2: Mehrere SchwachstellenDeutsch2026-05-03csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in vm2 ausnutzen, um beliebigen Programmcode auszuführen, um einen Denial of Service Angriff durchzuführen, um Informationen offenzulegen, und um Sicherheitsvorkehrungen zu umgehen.
- GHSA-grj5-jjm8-h35pVM2 Sandbox Breakout Through __lookupGetter__2026-05-04ghsa · osvUS
### Summary VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. ### Details The `__lookupGetter__` method allows to read the getter of an object. It is special in VM2 since it will switch between the host and sandbox version of the method when passed to the other context. This allows to access getters on an object in the host context if the method is called from the host context which can be achieved by using the host `apply` method which can be accessed through `Buffer.apply`. Afterwards, this function can be used to call the host version of `__lookupGetter__` with `Buffer` and `__proto__` resulting in the prototype lookup method from the host context. With this method the hosts `Function.prototype` object can be retrieved and the host `Function` acquired through the `constructor` property which allows to create and run code in the host context. This issue was attempted to be fixed with https://github.com/patriksimek/vm2/blob/4b009c2d4b1131c01810c1205e641d614c322a29/lib/bridge.js#L427. However, this can be circumvented by using `Object.getOwnPropertyDescriptor` to get the `constructor` property. ### PoC The following code demonstrates this issue by acquiring the host process object and executing `touch pwned`. ```js const {VM} = require("vm2"); const vm = new VM(); vm.run(` const g = ({}).__lookupGetter__; const a = Buffer.apply; const p = a.apply(g, [Buffer, ['__proto__']]); Object.getOwnPropertyDescriptor(p.call(a),'constructor').value('return process')().mainModule.require('child_process').execSync('touch pwned'); `); ``` ### Impact Attackers can perform Remote Code Execution under the assumption that arbitrary code can be executed inside the context of a vm2 sandbox.
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (13)
External citations — patches, advisories, analysis.
- https://github.com/patriksimek/vm2/releasesPatchcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2026-24118cnnvd
- https://github.com/patriksimek/vm2/commit/2b5f3e3a060d9088f5e1cdd585d683d491f990a3enisa_euvd
- https://github.com/patriksimek/vm2/commit/f9b700b1c7d9ef2df416666cb24e0b659140cc74enisa_euvd
- https://github.com/patriksimek/vm2/releases/tag/v3.11.0enisa_euvd
- https://github.com/patriksimek/vm2/security/advisories/GHSA-grj5-jjm8-h35penisa_euvd
- https://access.redhat.com/security/cve/CVE-2026-24118nvd
- https://bugzilla.redhat.com/show_bug.cgi?id=2466502nvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan