🇰🇷 한글 설명
vscode-spell-checker 4.5.4 이전 버전에서 cSpell.trustedWorkspace 설정이 항상 true로 취급되어 신뢰할 수 없는 워크스페이스에서도 .cspell.config.js 파일이 자동 실행됩니다. 공격자는 악의적인 설정 파일을 배치하여 사용자의 권한으로 임의의 Node.js 코드를 실행할 수 있습니다.
💡 쉬운 설명
VS Code의 맞춤법 검사 확장이 신뢰할 수 없는 폴더를 열 때도 설정 파일을 자동으로 실행합니다. 공격자가 악의적인 파일을 포함한 폴더를 배포하면 사용자가 열 때 자동으로 공격자 코드가 실행됩니다.
🇺🇸 원문 (English)
vscode-spell-checker is a basic spell checker that works well with code and documents. Prior to v4.5.4, DocumentSettings._determineIsTrusted treats the configuration value cSpell.trustedWorkspace as the authoritative trust flag. The value defaults to true (package.json) and is read from workspace configuration each time settings are fetched. The code coerces any truthy value to true and forwards it to ConfigLoader.setIsTrusted , which in turn allows JavaScript/TypeScript configuration files ( .cspell.config.js/.mjs/.ts , etc.) to be located and executed. Because no VS Code workspace-trust state is consulted, an untrusted workspace can keep the flag true and place a malicious .cspell.config.js ; opening the workspace causes the extension host to execute attacker-controlled Node.js code with the user’s privileges. This vulnerability is fixed in v4.5.4.
📍 영향받는 시스템
vscode-spell-checker 버전 4.5.4 미만 모든 버전
⚔️ 공격 벡터
공격자가 악의적인 .cspell.config.js를 포함한 워크스페이스를 배포하고 사용자가 이를 VS Code에서 열도록 유도
🛡️ 대응 방법
vscode-spell-checker를 버전 4.5.4 이상으로 업그레이드
🔧 검증 코드
설치된 확장 목록에서 spell-checker가 표시되고 버전이 4.5.4 이상인지 확인합니다
code --list-extensions | grep -i spell-checker && code --list-extensions --show-versions | grep -i spell-checker