🇰🇷 한글 설명
go-git 라이브러리에서 참조 이름(reference names)에 대한 검증이 누락되어 발생하는 취약점입니다. 공격자가 디렉터리 트래버설 시퀀스가 포함된 악의적인 참조 이름을 사용하면, 의도된 저장 디렉터리 외부의 경로에 파일을 쓸 수 있습니다.
💡 쉬운 설명
프로그램이 파일 이름을 저장할 때 검사를 제대로 하지 않아, 공격자가 파일 이름을 조작해 시스템의 엉뚱한 곳에 파일을 만들 수 있는 문제입니다. 이를 통해 중요한 시스템 파일을 덮어쓰거나 변조할 위험이 있습니다.
🇺🇸 원문 (English)
go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, reference names are not sanitized before being used to construct on-disk paths under the reference storage directory, so a maliciously crafted reference name (for example containing directory-traversal sequences) can cause go-git to write files outside the intended reference storage directory. Versions 5.19.2 and 6.0.0-alpha.5 fix the issue.
📍 영향받는 시스템
go-git 5.19.2 미만 버전 및 6.0.0-alpha.5 미만 버전
⚔️ 공격 벡터
디렉터리 트래버설 시퀀스(예: ../)가 포함된 악의적인 참조 이름을 전달하여 파일 경로 조작
🛡️ 대응 방법
go-git 라이브러리를 5.19.2 또는 6.0.0-alpha.5 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 go-git의 버전을 확인하여 5.19.2 또는 6.0.0-alpha.5보다 낮은지 확인
go list -m all | grep go-git