🇰🇷 한글 설명
Visual Studio Code의 Markdown Preview Enhanced 확장 프로그램 0.8.30 미만 버전에서 발생하는 취약점입니다. 공격자가 제어하는 URI와 콘텐츠를 통해 vscode.workspace.fs.writeFile 명령을 악용하여 사용자의 권한으로 임의의 파일을 생성하거나 수정할 수 있습니다. 이 취약점을 악용하려면 먼저 웹뷰 내에서 자바스크립트 실행이 가능한 별도의 경로가 필요합니다.
💡 쉬운 설명
마크다운 미리보기 확장 프로그램의 허점을 이용해 해커가 내 컴퓨터의 중요한 설정 파일이나 소스 코드를 몰래 바꿀 수 있는 문제입니다. 이를 위해서는 먼저 미리보기 화면에서 악성 코드가 실행될 수 있는 다른 취약점이 먼저 이용되어야 합니다.
🇺🇸 원문 (English)
Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.30, the _crossnote.updateMarkdown command in Markdown Preview Enhanced accepts an arbitrary URI and attacker-controlled content, then passes them to vscode.workspace.fs.writeFile without validating that the target is the Markdown file represented by the current preview. JavaScript already executing in the preview webview can invoke this command through the extension message bridge and write any file permitted by the VS Code user's operating-system privileges, including user configuration, startup, source, and build files. This file-write vulnerability requires a separate webview JavaScript execution path, such as the independently tracked head.html injection and blind command-dispatch weaknesses. This issue is fixed in version 0.8.30.
📍 영향받는 시스템
Markdown Preview Enhanced extension (version < 0.8.30)
⚔️ 공격 벡터
웹뷰 내 자바스크립트 실행을 통한 확장 프로그램 메시지 브릿지 명령 호출
🛡️ 대응 방법
Markdown Preview Enhanced 확장 프로그램을 0.8.30 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 0.8.30 미만인지 확인하십시오.
code --list-extensions | grep markdown-preview-enhanced && code --list-extensions | grep markdown-preview-enhanced | xargs -I {} code --extension-version {} 2>/dev/null