🇰🇷 한글 설명
Visual Studio Code의 Markdown Preview Enhanced 확장 프로그램 0.8.29 미만 버전에서 발생하는 취약점입니다. 악성 저장소의 설정 파일을 열 때 vm.runInNewContext의 보안 경계 미비로 인해 프로토타입 체인 트래버설을 통한 원격 코드 실행이 가능합니다. 이로 인해 공격자는 사용자의 권한으로 운영체제 명령을 실행할 수 있습니다.
💡 쉬운 설명
해커가 만든 위험한 프로젝트 파일을 VS Code에서 열기만 해도 컴퓨터가 해킹될 수 있는 보안 결함입니다. 악성 코드가 자동으로 실행되어 공격자가 사용자의 컴퓨터를 마음대로 조종할 수 있습니다.
🇺🇸 원문 (English)
Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.29, Markdown Preview Enhanced evaluates repository-controlled .crossnote/config.js and .crossnote/parser.js files with vm.runInNewContext, which does not provide a security boundary from the Node.js host realm. Opening a Markdown file in a malicious repository automatically loads these files, and prototype-chain traversal can reach the host Function constructor and process object, allowing operating-system commands to execute as the victim account without further interaction. Both configuration evaluation and parser-hook evaluation are affected, and the attack does not depend on module-scoped require being available. This issue is fixed in version 0.8.29.
📍 영향받는 시스템
Markdown Preview Enhanced extension (version < 0.8.29)
⚔️ 공격 벡터
악성 .crossnote/config.js 또는 .crossnote/parser.js 파일이 포함된 저장소의 Markdown 파일을 열어 공격 수행
🛡️ 대응 방법
Markdown Preview Enhanced 확장 프로그램을 0.8.29 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 0.8.29보다 낮으면 취약한 상태이며, 0.8.29 이상이면 안전합니다.
code --list-extensions | grep markdown-preview-enhanced && code --list-extensions | grep markdown-preview-enhanced | xargs -I {} code --extension-version {} 2>/dev/null || echo 'Extension not found'