🇰🇷 한글 설명
Enclave는 안전한 JavaScript 샌드박스이며, 2.7.0 버전 이전에는 샌드박스 탈출 취약점이 있어 신뢰할 수 없는 JavaScript 코드가 호스트 Node.js 런타임에서 임의의 코드를 실행할 수 있다.
💡 쉬운 설명
Enclave 샌드박스에 있는 취약점으로 인해 해커가 호스트 시스템에 접근할 수 있으며, 이는 매우 심각한 보안 위협이다. 이 취약점은 2.7.0 버전에서 수정되었다.
🇺🇸 원문 (English)
Enclave is a secure JavaScript sandbox designed for safe AI agent code execution. Prior to 2.7.0, there is a critical sandbox escape vulnerability in enclave-vm that allows untrusted, sandboxed JavaScript code to execute arbitrary code in the host Node.js runtime. When a tool invocation fails, enclave-vm exposes a host-side Error object to sandboxed code. This Error object retains its host realm prototype chain, which can be traversed to reach the host Function constructor. An attacker can intentionally trigger a host error, then climb the prototype chain. Using the host Function constructor, arbitrary JavaScript can be compiled and executed in the host context, fully bypassing the sandbox and granting access to sensitive resources such as process.env, filesystem, and network. This breaks enclave-vm’s core security guarantee of isolating untrusted code. This vulnerability is fixed in 2.7.0.
📍 영향받는 시스템
Enclave 2.7.0 이전 버전
⚔️ 공격 벡터
도구 호출 실패 시 호스트 오류를 유발하고, 프로토タイプ 체인을 통해 호스트 함수 생성자를 호출하여 임의의 JavaScript 코드를 호스트 컨텍스트에서 실행
🛡️ 대응 방법
Enclave를 2.7.0 버전 이상으로 업그레이드
🔧 검증 코드
로컬 시스템의 Python 환경에서 실행 필요. Enclave 패키지 버전을 확인하여 취약한 버전 여부를 판단
python -c 'import pkg_resources; print("\n".join([str(dist) for dist in pkg_resources.working_set if dist.project_name == "enclave"]))'