🇰🇷 한글 설명
gitoxide의 gix-worktree-state 0.33.0 미만 버전에서 Windows 환경 사용 시 작업 트리 외부의 파일을 작성할 수 있는 취약점이 존재합니다. core.symlinks 설정이 활성화된 상태에서 증분 체크아웃을 수행할 때, 기존의 심볼릭 링크를 따라가 파일 내용을 덮어쓰는 문제가 발생합니다.
💡 쉬운 설명
특수하게 조작된 파일을 다운로드하면 컴퓨터의 원래 폴더가 아닌 엉뚱한 위치의 중요한 파일을 망가뜨릴 수 있습니다. 이는 링크를 통해 경로를 우회하여 파일을 덮어쓰는 방식입니다.
🇺🇸 원문 (English)
gix-worktree-state before 0.33.0 (part of gitoxide) allows writing files outside the worktree on Windows. gix_worktree_state::checkout() follows an existing terminal symlink during non-exclusive (incremental) materialization (destination_is_initially_empty: false) when core.symlinks is true. If a symlink entry (mode 120000) is first checked out at a path P pointing outside the worktree, a subsequent incremental checkout of a regular-file entry (mode 100644) at the same path follows the existing reparse point and writes the blob content through the link, overwriting files outside the worktree.
📍 영향받는 시스템
gitoxide (gix-worktree-state) 0.33.0 미만 버전 (Windows 환경)
⚔️ 공격 벡터
악의적으로 조작된 심볼릭 링크가 포함된 저장소를 체크아웃하여 작업 트리 외부 파일에 쓰기 시도
🛡️ 대응 방법
gitoxide를 0.33.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
설치된 gitoxide의 버전을 확인하여 0.33.0 미만인지 체크합니다.
cargo pkgid | grep gitoxide || echo 'Not installed'