Full Report
Cybersecurity researchers have disclosed a critical security flaw in isolated-vm, a popular open-source sandbox with more than 2,900 stars and 190 forks on GitHub, that could allow attackers to escape the confines of the isolated environment. The vulnerability ("GHSA-864f-rcv7-6rh4"), which has yet to be assigned a CVE identifier, impacts all versions of the library before and including 7.0.0.
Analysis Summary
# Vulnerability: Isolated-vm Sandbox Escape via Type Confusion
## CVE Details
- **CVE ID:** Not yet assigned (identified by GitHub Security Advisory: GHSA-864f-rcv7-6rh4)
- **CVSS Score:** Critical (Numerical score not finalized, but classified as critical by researchers)
- **CWE:** CWE-843 (Access of Resource Using Incompatible Type / Type Confusion)
## Affected Systems
- **Products:** isolated-vm (Node.js library)
- **Versions:** All versions up to and including v7.0.0 (specifically impacts versions prior to 6.2.0 and 7.0.1)
- **Configurations:** Systems utilizing the `ivm.Reference` class or `ExternalCopy` component to pass capabilities or data between the host and the guest sandbox.
## Vulnerability Description
The vulnerability exists in the C++ "glue code" that manages the boundary between the host Node.js process and the guest V8 Isolate. Specifically, a type confusion flaw was discovered in how the `ExternalCopy` class handles the `transferList` option. When serializing and deserializing JavaScript objects across the boundary, an attacker can manipulate this option to corrupt memory in the host process. This undermines the V8 Isolate boundary, not by breaking V8 itself, but by exploiting the binding layer that marshals values between environments.
## Exploitation
- **Status:** PoC demonstrated by researchers; details currently withheld to prevent widespread exploitation.
- **Complexity:** High (Requires sophisticated understanding of memory corruption and V8 internals to move from a crash to RCE).
- **Attack Vector:** Local/Network (Any guest JavaScript code running within the sandbox that has been granted an `ivm.Reference` can trigger the flaw).
## Impact
- **Confidentiality:** High (Potential for full guest-to-host sandbox escape and data access).
- **Integrity:** High (Host control-flow hijack and potential Remote Code Execution (RCE)).
- **Availability:** High (Reliable, controlled-address crashes causing Denial of Service via SIGSEGV).
## Remediation
### Patches
- **Version 6.2.0:** Recommended for users on the 6.x branch.
- **Version 7.0.1:** Recommended for users on the 7.x branch.
### Workarounds
- No specific software workarounds were provided; immediate update to patched versions is the primary recommended mitigation.
## Detection
- **Indicators of Compromise:** Unexpected segmentation faults (SIGSEGV) or host process crashes.
- **Detection Methods:** Monitor for unusual memory access patterns or crashes originating from the `isolated-vm` binding layer. Review application logs for crashes involving the `ExternalCopy` or `transferList` functions.
## References
- **GitHub Advisory:** [https://github.com/laverdet/isolated-vm/security/advisories/GHSA-864f-rcv7-6rh4]
- **Researcher Technical Write-up:** [https://www.endorlabs.com/learn/ghsa-864f-rcv7-6rh4-critical-type-confusion-vulnerability-in-isolated-vm]
- **Vendor Repository:** [https://github.com/laverdet/isolated-vm]