🇰🇷 한글 설명
Git LFS 0.5.2부터 3.7.0 버전에서 심볼릭 링크나 하드 링크를 통해 저장소 외부의 파일을 덮어쓸 수 있는 경로 검증 부재 취약점입니다. git lfs checkout/pull 명령어 실행 시 악의적인 링크를 따라 임의의 파일 시스템 위치에 쓰기 작업을 수행할 수 있으며, 3.7.1에서 수정되었습니다.
💡 쉬운 설명
Git LFS 도구가 특정 버전에서 심볼릭 링크를 검증하지 않아, 악의적인 저장소에서 중요한 시스템 파일을 덮어쓸 수 있습니다. 저장소를 받을 때나 업데이트할 때 이 취약점이 동작합니다.
🇺🇸 원문 (English)
Git LFS is a Git extension for versioning large files. In Git LFS versions 0.5.2 through 3.7.0, when populating a Git repository's working tree with the contents of Git LFS objects, certain Git LFS commands may write to files visible outside the current Git working tree if symbolic or hard links exist which collide with the paths of files tracked by Git LFS. The git lfs checkout and git lfs pull commands do not check for symbolic links before writing to files in the working tree, allowing an attacker to craft a repository containing symbolic or hard links that cause Git LFS to write to arbitrary file system locations accessible to the user running these commands. As well, when the git lfs checkout and git lfs pull commands are run in a bare repository, they could write to files visible outside the repository. The vulnerability is fixed in version 3.7.1. As a workaround, support for symlinks in Git may be disabled by setting the core.symlinks configuration option to false, after which further clones and fetches will not create symbolic links. However, any symbolic or hard links in existing repositories will still provide the opportunity for Git LFS to write to their targets.
📍 영향받는 시스템
Git LFS 0.5.2 ~ 3.7.0
⚔️ 공격 벡터
악의적인 심볼릭/하드 링크가 포함된 저장소를 clone하거나 pull할 때 발동
🛡️ 대응 방법
Git LFS를 3.7.1 이상으로 업그레이드 또는 git config core.symlinks false로 설정
🔧 검증 코드
버전이 3.7.1 이상이면 패치됨, 3.7.0 이하면 취약함
git lfs version 2>/dev/null | head -1