MISFIRE

Browse / AI Framework and Platform Flaws / CVE-2022-25893

vm2 vulnerable to Arbitrary Code Execution

CVE-2022-25893 ยท 2022-12-21 critical

Class
AI Framework and Platform Flaws (filed by a model that read the source)
Technique
Sandbox escape
Affected
vm2 (npm)
Gets past
Sandbox or allowlist
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.5% chance of exploitation in 30 days

How it works, in short

A WeakMap prototype lookup in vm2 gives sandboxed code access to a host object, allowing it to escape the sandbox. (Our summary, written by a model. The source text is below.)

Details

The package vm2 before 3.9.10 is vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the WeakMap.prototype.set method. Exploiting this vulnerability leads to access to a host object and a sandbox compromise.

References

Source: GitHub Advisory Database, used under CC BY 4.0.