Particle.news

Type-Confusion Bug in isolated-vm Lets Sandboxed JavaScript Corrupt Host Memory

Maintainers patched the native ExternalCopy binding and warn users to update to stop a bug that can be escalated from a crash to host control-flow takeover.

Overview

  • Researchers at Endor Labs reported a type-confusion and TOCTOU flaw in isolated-vm's ExternalCopy that lets code running in a sandbox corrupt the host process and, in demonstrations, be escalated to host control-flow hijack.
  • Coverage from Aug. 20–22 shows the defect comes from the C++ glue code re-reading a transferList getter twice and trusting the first read so an attacker can cause a bad dereference.
  • All isolated-vm releases up to and including 7.0.0 are affected and any host that shares an ivm.Reference or accepts a caller-controlled transferList can be vulnerable without a malicious guest.
  • Maintainers released fixes in isolated-vm 6.2.0 and 7.0.1 that stop user JavaScript from running during the copy and researchers have withheld exploit details while urging immediate updates.
  • The flaw highlights a common risk where a correct V8 Isolate boundary is undermined by memory-unsafe native bindings and raises urgency for developers to patch, limit References, and isolate worker privileges.