🇰🇷 한글 설명
npm 패키지 interactive-git-checkout 1.1.4 이하 버전에서 브랜치 이름을 입력받을 때 검증 없이 git checkout 명령에 전달하여 명령어 주입 취약점이 발생합니다. 악의적인 입력을 통해 시스템에서 임의의 명령어를 실행할 수 있습니다.
💡 쉬운 설명
Git 도구에서 사용자 입력을 제대로 검사하지 않아, 악의적인 명령이 숨겨져 있는 브랜치 이름을 입력하면 컴퓨터가 해커가 원하는 작업을 실행하게 됩니다. 이는 시스템 전체가 침해될 수 있는 매우 심각한 문제입니다.
🇺🇸 원문 (English)
The npm package `interactive-git-checkout` is an interactive command-line tool that allows users to checkout a git branch while it prompts for the branch name on the command-line. It is available as an npm package and can be installed via `npm install -g interactive-git-checkout`. Versions up to and including 1.1.4 of the `interactive-git-checkout` tool are vulnerable to a command injection vulnerability because the software passes the branch name to the `git checkout` command using the Node.js child process module's `exec()` function without proper input validation or sanitization. Commit 8dd832dd302af287a61611f4f85e157cd1c6bb41 fixes the issue.
📍 영향받는 시스템
npm package interactive-git-checkout version ≤ 1.1.4
⚔️ 공격 벡터
사용자에게 git 브랜치 이름 입력을 요청할 때 악의적인 셸 명령어를 포함한 입력값을 제공하여 임의 코드 실행 달성
🛡️ 대응 방법
npm install -g interactive-git-checkout@latest로 패키지를 최신 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 1.1.5 이상이면 안전하고, 1.1.4 이하이면 즉시 업데이트 필요합니다.
npm list -g interactive-git-checkout 2>/dev/null | grep interactive-git-checkout