🇰🇷 한글 설명
vm2 3.11.3 이전 버전에서 비동기 생성기의 yield* 표현식으로 호스트 예외를 포착하여 샌드박스를 탈출하고 호스트 시스템에서 임의의 명령을 실행할 수 있는 치명적 취약점입니다.
💡 쉬운 설명
vm2라는 코드 실행 보안 도구에 구멍이 있어서 악의적인 코드가 보안 제한을 피하고 컴퓨터 전체를 제어할 수 있습니다. 즉시 업그레이드 필요합니다.
🇺🇸 원문 (English)
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.3, it is possible to catch a host exception using the yield* expression inside an async generator. When the generator is closed using the return function, the value is awaited on and exceptions thrown in the then call will be caught by the runtime and passed to the yield* iterator as the next value. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.3.
📍 영향받는 시스템
vm2 < 3.11.3 (Node.js npm 패키지)
⚔️ 공격 벡터
비동기 생성기 내 yield* 표현식과 generator.return() 함수 조합으로 샌드박스 탈출
🔧 검증 코드
출력된 버전이 3.11.3 미만이면 취약함
npm list vm2 2>/dev/null | grep vm2@ | sed 's/.*@//' | cut -d' ' -f1