🇰🇷 한글 설명
GitPython 3.1.58 미만 버전의 Repo.init 함수에서 검증되지 않은 git 옵션이 전달되어 원격 코드 실행(RCE)이 발생할 수 있습니다. 공격자가 악성 git hook이 포함된 디렉토리를 가리키는 template 파라미터를 제공하면, 저장소 초기화 시 임의의 코드가 실행될 수 있습니다.
💡 쉬운 설명
GitPython이라는 도구를 사용할 때, 공격자가 조작된 설정 파일을 보내면 컴퓨터가 몰래 나쁜 명령어를 실행하게 만들 수 있는 취약점입니다. 저장소를 만드는 과정에서 공격자가 숨겨놓은 악성 스크립트가 작동하게 됩니다.
🇺🇸 원문 (English)
GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.
📍 영향받는 시스템
GitPython versions prior to 3.1.58
⚔️ 공격 벡터
Repo.init 함수의 template 파라미터에 악성 git hook이 포함된 디렉토리 경로를 주입하여 공격
🛡️ 대응 방법
GitPython 라이브러리를 3.1.58 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Version이 3.1.58 미만이면 취약한 상태이며, 3.1.58 이상이면 안전합니다.
pip show gitpython | grep Version