🇰🇷 한글 설명
mcp-server-git 2025.12.17 이전 버전에서 git_diff와 git_checkout 함수가 사용자 입력을 검증 없이 git 명령어에 전달하는 플래그 인젝션 취약점 존재. 공격자가 --output=/path/to/file 같은 플래그를 입력하여 임의의 파일 덮어쓰기 가능. 최신 버전에서 입력값 검증과 git ref 검증이 추가되어 수정됨.
💡 쉬운 설명
mcp-server-git이 사용자 입력을 제대로 확인하지 않아서 악의적인 사용자가 컴퓨터의 파일을 임의로 덮어쓸 수 있는 보안 문제. 버전 2025.12.17 이상으로 업데이트하면 해결됨.
🇺🇸 원문 (English)
In mcp-server-git versions prior to 2025.12.17, the git_diff and git_checkout functions passed user-controlled arguments directly to git CLI commands without sanitization. Flag-like values (e.g., `--output=/path/to/file` for `git_diff`) would be interpreted as command-line options rather than git refs, enabling arbitrary file overwrites. The fix adds validation that rejects arguments starting with - and verifies the argument resolves to a valid git ref via rev_parse before execution. Users are advised to update to 2025.12.17 resolve this issue when it is released.
📍 영향받는 시스템
mcp-server-git < 2025.12.17
⚔️ 공격 벡터
git_diff/git_checkout 함수 호출 시 인자에 --output=/path/to/file 같은 플래그를 주입하여 임의 파일 덮어쓰기
🛡️ 대응 방법
mcp-server-git를 2025.12.17 이상 버전으로 업데이트
🔧 검증 코드
Version 필드의 버전 번호가 2025.12.17 이상이면 패치됨, 미만이면 업데이트 필요
pip show mcp-server-git 2>/dev/null | grep Version || npm list -g mcp-server-git 2>/dev/null | grep mcp-server-git