🇰🇷 한글 설명
Angular Language Service VS Code 확장 프로그램이 워크스페이스 설정(.vscode/settings.json)에 지정된 TypeScript SDK 경로를 검증 없이 읽어 들여 배경 프로세스에서 실행하는 취약점입니다. 공격자가 악성 tsserverlibrary.js 파일을 포함한 저장소를 배포하면, 개발자가 해당 프로젝트를 여는 것만으로도 악성 코드가 자동으로 실행될 수 있습니다.
💡 쉬운 설명
개발 도구가 설정 파일에 적힌 경로를 무조건 믿고 실행하는 점을 악용한 보안 허점입니다. 나쁜 의도를 가진 프로젝트를 열기만 해도 컴퓨터에서 몰래 악성 프로그램이 돌아갈 수 있습니다.
🇺🇸 원문 (English)
The Angular Language Service VS Code Extension provides a rich editing experience for Angular templates. Prior to 21.2.4, the client-side Angular Language Service VS Code extension reads the custom TypeScript SDK paths typescript.tsdk and js/ts.tsdk.path directly from workspace configurations (.vscode/settings.json) without verifying VS Code Workspace Trust state or asking for user consent (located in client/src/client.ts). The client-side extension then passes the parsed settings path as a command-line argument (--tsdk) to the background Node.js language server process. During server initialization, the background language server resolves and dynamically imports (via standard Node.js require()) the module library tsserverlibrary.js relative to the workspace-specified custom directory path. An attacker can exploit this behavior by committing a repository containing a local malicious tsserverlibrary.js script inside a custom folder, and a crafted .vscode/settings.json file pointing to that folder. When a developer opens the repository folder in VS Code, the extension automatically attempts to initialize and load the server, which dynamically resolves, loads, and executes the malicious script silently in the background. This vulnerability is fixed in 21.2.4.
📍 영향받는 시스템
Angular Language Service VS Code Extension version < 21.2.4
⚔️ 공격 벡터
악성 스크립트와 조작된 .vscode/settings.json 파일이 포함된 저장소를 개발자가 VS Code로 여는 방식
🛡️ 대응 방법
Angular Language Service VS Code 확장 프로그램을 21.2.4 버전 이상으로 업데이트하십시오.
🔧 검증 코드
설치된 확장 프로그램 목록에서 angular-language-service를 확인하고, 해당 버전이 21.2.4 미만인지 체크합니다.
code --list-extensions | grep angular-language-service && code --version