🇰🇷 한글 설명
go-git 라이브러리의 버전 5.17.1 미만 버전에서 Git 인덱스 포맷 버전 4를 디코딩할 때 경로 이름 접두사 길이를 검증하지 않는 취약점이 발견되었습니다. 악의적으로 조작된 인덱스 파일을 사용하면 범위를 벗어난 슬라이스 연산이 발생하여 런타임 패닉(프로그램 강제 종료)이 유발될 수 있습니다.
💡 쉬운 설명
조작된 Git 파일을 읽을 때 프로그램이 길이를 잘못 계산하여 갑자기 꺼져버리는 문제입니다. 이 문제는 Git 인덱스 버전 4를 사용하는 경우에만 발생합니다.
🇺🇸 원문 (English)
go-git is an extensible git implementation library written in pure Go. Prior to version 5.17.1, go-git’s index decoder for format version 4 fails to validate the path name prefix length before applying it to the previously decoded path name. A maliciously crafted index file can trigger an out-of-bounds slice operation, resulting in a runtime panic during normal index parsing. This issue only affects Git index format version 4. Earlier formats (go-git supports only v2 and v3) are not vulnerable to this issue. This issue has been patched in version 5.17.1.
📍 영향받는 시스템
go-git version 5.17.1 미만
⚔️ 공격 벡터
취약한 버전의 go-git을 사용하는 애플리케이션에 악의적으로 조작된 Git 인덱스 파일(v4)을 입력함
🛡️ 대응 방법
go-git 라이브러리를 버전 5.17.1 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 5.17.1 미만인지 확인하십시오.
go list -m github.com/go-git/go-git/v5 2>/dev/null