<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Vm2 (&lt;= 3.11.1) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/vm2--3.11.1/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 17:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/vm2--3.11.1/feed.xml" rel="self" type="application/rss+xml"/><item><title>VM2 Sandbox Breakout via neutralizeArraySpeciesBatch Method</title><link>https://feed.craftedsignal.io/briefs/2024-01-vm2-sandbox-breakout/</link><pubDate>Wed, 03 Jan 2024 17:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-vm2-sandbox-breakout/</guid><description>A sandbox breakout vulnerability in vm2 allows attackers to execute arbitrary commands on the host system by exploiting the `neutralizeArraySpeciesBatch` method to access host objects and the Function object.</description><content:encoded><![CDATA[<p>A critical sandbox escape vulnerability has been identified in vm2 versions 3.11.1 and earlier. This flaw allows an attacker to bypass the intended security restrictions of the vm2 sandbox, gaining the ability to execute arbitrary code on the host system. The vulnerability stems from the <code>neutralizeArraySpeciesBatch</code> method, which improperly handles objects from different contexts. By exploiting this, an attacker can gain access to host objects, including the host <code>Function</code> object, effectively breaking out of the sandbox. This poses a significant risk to applications relying on vm2 for secure code execution, as it could lead to complete system compromise.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker injects malicious JavaScript code into the vm2 sandbox.</li>
<li>The injected code manipulates the <code>Array.prototype</code> using <code>Object.defineProperty</code>.</li>
<li>The <code>neutralizeArraySpeciesBatch</code> method is triggered, which attempts to neutralize objects passed between the sandbox and the host.</li>
<li>The code leverages a getter on the array prototype to expose objects from the host environment into the sandbox.</li>
<li>The attacker obtains a reference to the host&rsquo;s <code>Buffer.prototype.inspect</code> function through the exposed objects.</li>
<li>The attacker uses <code>Buffer.prototype.inspect.constructor.constructor</code> to obtain a reference to the host&rsquo;s <code>Function</code> constructor.</li>
<li>The <code>Function</code> constructor is then used to execute arbitrary code on the host system, such as using <code>child_process.execSync</code> to create a file.</li>
<li>The attacker achieves remote code execution on the host, bypassing the vm2 sandbox.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to execute arbitrary commands on the host system. This can lead to complete system compromise, data exfiltration, or denial-of-service. Given the widespread use of vm2 in sandboxing JavaScript code, a successful attack could have significant consequences for many applications and systems. The vulnerability has been assigned CVE-2026-44008 and is rated as critical severity.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of vm2 (later than 3.11.1) to remediate CVE-2026-44008.</li>
<li>Deploy the Sigma rule &ldquo;Detect VM2 Sandbox Escape via Array Prototype Manipulation&rdquo; to identify exploitation attempts within your environment.</li>
<li>Enable process creation logging to allow for detection of commands executed by the escaped sandbox, as identified by the Sigma rule &ldquo;Detect Host Command Execution from VM2 Sandbox&rdquo;.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>sandbox-escape</category><category>rce</category><category>javascript</category></item></channel></rss>