🇰🇷 한글 설명
Markdown Preview Enhanced 0.8.28 이전 버전은 미리보기 과정에서 외부 파일과 링크를 셸을 통해 열며, 마크다운 문서에서 전달된 다이어그램 파일명, 가져오기 파일 경로, latex_engine 코드 청크 속성을 검증하지 않습니다. Windows에서는 조작된 마크다운 문서가 미리보기 시 실행되는 운영체제 명령어를 주입할 수 있습니다. 0.8.28에서는 이 입력값을 셸을 거치지 않고 리터럴 인자로 전달하고 사용 전 검증하도록 수정되었습니다.
💡 쉬운 설명
Markdown Preview Enhanced라는 문서 미리보기 확장 프로그램의 취약점으로, 악성 마크다운 문서를 열어 미리보기하면 컴퓨터에서 공격자가 정한 명령이 실행될 수 있습니다. 0.8.28 이상 버전으로 업데이트하면 해결됩니다.
🇺🇸 원문 (English)
Markdown Preview Enhanced before 0.8.28 opens external files and links from the preview through a shell and does not validate untrusted inputs taken from the markdown document - the diagram filename attribute, imported file paths, and the latex_engine code-chunk attribute. On Windows, a crafted markdown document can inject operating system commands that execute when the document is previewed. Fixed in 0.8.28 by passing these inputs as literal arguments instead of through a shell and validating them before use.
📍 영향받는 시스템
Markdown Preview Enhanced 0.8.28 미만 버전 (주로 Windows 환경, VS Code/Atom 확장 프로그램)
⚔️ 공격 벡터
공격자가 조작된 마크다운 문서를 제공하고, 피해자가 이를 미리보기하면 문서 내 특정 속성에 삽입된 OS 명령어가 실행됨
🛡️ 대응 방법
Markdown Preview Enhanced를 0.8.28 이상으로 업데이트하고, 신뢰할 수 없는 마크다운 문서의 미리보기를 피함
🔧 검증 코드
출력된 버전이 0.8.28 미만이면 취약하며, 0.8.28 이상이면 패치된 버전이고, 출력이 없으면 해당 확장 프로그램이 설치되지 않은 것입니다.
code --list-extensions --show-versions 2>/dev/null | grep -i 'markdown-preview-enhanced'