{"id":"CVE-2023-32313","aliases":["CVE-2023-32313","GHSA-p5gc-c584-jj6v"],"related":[],"kind":"vulnerability","state":"published","title":"Inspect method manipulation in vm2","summary":"vm2 is a sandbox that can run untrusted code with Node's built-in modules. In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node `inspect` method and edit options for `console.log`. As a result a threat actor can edit options for the `console.log` command. This vulnerability was patched in the release of version `3.9.18` of `vm2`. Users are advised to upgrade. Users unable to upgrade may make the `inspect` method readonly with `vm.readonly(inspect)` after creating a vm.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"vm2 is a sandbox that can run untrusted code with Node's built-in modules. In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node `inspect` method and edit options for `console.log`. As a result a threat actor can edit options for the `console.log` command. This vulnerability was patched in the release of version `3.9.18` of `vm2`. Users are advised to upgrade. Users unable to upgrade may make the `inspect` method readonly with `vm.readonly(inspect)` after creating a vm.","source":"cvelist"},{"lang":"en","text":"In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node `inspect` method and edit options for `console.log`.\n\n### Impact\nA threat actor can edit options for `console.log`.\n\n### Patches\nThis vulnerability was patched in the release of version `3.9.18` of `vm2`.\n\n### Workarounds\nAfter creating a vm make the `inspect` method readonly with `vm.readonly(inspect)`.\n\n### References\nPoC - https://gist.github.com/arkark/c1c57eaf3e0a649af1a70c2b93b17550\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [VM2](https://github.com/patriksimek/vm2)\n\nThanks to @arkark (Takeshi Kaneko) of GMO Cybersecurity by Ierae, Inc. for disclosing this vulnerability.","format":"markdown","source":"ghsa"}],"published":"2023-05-15T19:45:13.963Z","modified":"2026-09-10T03:50:01.835Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":"< 3.9.18","status":"affected"}],"vendor":"patriksimek","product":"vm2","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.9.18"}],"ecosystem":"npm","package":"vm2","purl":"pkg:npm/vm2","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.9.18"}],"vendor":"vm2_project","product":"vm2","cpe":"cpe:2.3:a:vm2_project:vm2:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-p5gc-c584-jj6v","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/patriksimek/vm2/commit/5206ba25afd86ef547a2c9d48d46ca7a9e6ec238","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://gist.github.com/arkark/c1c57eaf3e0a649af1a70c2b93b17550","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/patriksimek/vm2/releases/tag/3.9.18","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-32313","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/patriksimek/vm2","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-01-22T21:42:52.762Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-32313","url":"https://www.cve.org/CVERecord?id=CVE-2023-32313","licence":"CVE Terms of Use","modified":"2025-01-22T21:42:56.955Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p5gc-c584-jj6v","url":"https://github.com/advisories/GHSA-p5gc-c584-jj6v","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:01.835Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-32313","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-32313","licence":"Public domain","modified":"2026-06-17T05:58:32.993Z"}],"updatedAt":"2026-11-25T22:58:24.171Z","epss":{"score":0.0079,"percentile":0.57445,"date":"2026-12-01T12:00:22.000Z"}}