تخطي إلى المحتوى الرئيسي
Cyber News SecurityWeek 7 hours ago

Critical Isolated-vm Vulnerability Leads to RCE on Host

Se
SecurityWeek
Vulnerability

A critical-severity type confusion in the isolated-vm Node.js library could allow threat actors to achieve remote code execution (RCE) on the host system.

Through isolated-vm, developers can access the V8 JavaScript engine’s Isolate interface to build completely isolated JavaScript environments. Each Isolate is a completely separated V8 instance, with its own heap memory, execution state, and garbage collector.

V8’s Isolates enabled the execution of multiple sandboxed JavaScript code instances on the same machine, without the need for a container or a virtual machine. isolated-vm is widely used for executing untrusted JavaScript code within a V8 Isolate.

The recently identified type confusion bug, which has yet to be assigned a CVE identifier, impacts ExternalCopy, the function used to copy data across Isolates, EndorLabs explains. The function serializes the data in one Isolate and reconstructs it in the other instance.

For performance optimization, it uses a transferList: large ArrayBuffers are listed, and the underlying memory is transferred by detaching the buffer from the source and handing it to the destination.

The issue was that, when data was transferred, the reconstructor iterated over the byte array list twice, with the second pass trusting the first walk.

Advertisement. Scroll to continue reading.

However, because iterating the transfer_list JavaScript array would not return the same value for an element defined as a getter for each pass, an attacker could abuse the time-of-check/time-of-use (TOCTOU) weakness to dereference an attacker-controlled pointer.

Written By Ionut Arghire

View Original Report

This intelligence was aggregated from SecurityWeek.

Read on Source
Advertisement