🇰🇷 한글 설명
Node.js용 샌드박스 라이브러리 vm2의 3.11.4 이전 버전에서 보안 패치 우회 취약점이 발견되었습니다. 'require' 옵션을 명시적으로 전달하지 않으면 엄격한 비교 연산자가 실패하여 샌드박스 격리 장치가 우회될 수 있습니다.
💡 쉬운 설명
개발자가 설정을 제대로 지정하지 않았을 때, 프로그램이 의도한 보안 장치를 무시하고 외부 코드를 실행할 수 있는 구멍이 있습니다. 이는 공격자가 샌드박스 밖의 시스템에 접근하여 악의적인 작업을 수행할 수 있게 합니다.
🇺🇸 원문 (English)
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the fix for GHSA-8hg8-63c5-gwmx (CVE-2023-37903) introduced a check in nodevm.js line 263 that blocks the combination nesting: true + require: false. However, the check uses strict equality (options.require === false), which is trivially bypassed by omitting the require option entirely. When require is not specified, options.require is undefined, not false. The strict equality check fails, so the security guard is skipped. Immediately after (line 280), the destructuring default require: requireOpts = false assigns requireOpts = false, producing the exact configuration the patch was designed to prevent. This issue has been patched in version 3.11.4.
⚔️ 공격 벡터
require 옵션 미지정으로 인한 보안 체크 우회 및 샌드박스 탈출
🛡️ 대응 방법
vm2 라이브러리를 버전 3.11.4 이상으로 즉시 업그레이드하십시오.
🔧 검증 코드
출력된 버전 번호가 3.11.4보다 낮으면 취약한 버전이 설치된 것입니다.
npm list vm2 2>/dev/null | grep -E 'vm2@'