🇰🇷 한글 설명
Gogs 0.14.3 미만 버전에서 Git LFS 저장소의 권한 검증 미흡으로 인해 발생하는 취약점입니다. 공격자가 자신의 저장소에 다른 사용자의 비공개 저장소에 속한 OID(Object ID)를 연결함으로써, 권한이 없는 파일에 접근하고 다운로드할 수 있습니다.
💡 쉬운 설명
파일의 이름표만 보고 실제 파일이 맞는지 확인하지 않아 발생하는 보안 구멍입니다. 이를 통해 다른 사람이 몰래 숨겨둔 파일을 내 것처럼 속여서 가져올 수 있습니다.
🇺🇸 원문 (English)
Gogs is an open source self-hosted Git service. Prior to 0.14.3, Git LFS storage is content-addressed by OID alone (<LFS-root>/<oid[0]>/<oid[1]>/<oid>) but per-repo authorization lives in the lfs_object table keyed (repo_id, oid). serveUpload skips re-uploading when the OID file already exists on disk and inserts a new (repo_id, oid) row pointing at it without verifying the request body hashes to the OID being claimed. Any user with write access to one repo can bind their repo to an OID owned by a private repo and download the original bytes via their own download endpoint. This vulnerability is fixed in 0.14.3.
📍 영향받는 시스템
Gogs 0.14.3 미만 모든 버전
⚔️ 공격 벡터
권한이 있는 저장소에 타인의 OID를 사용하여 업로드 요청을 보내 파일 권한을 탈취하는 방식
🛡️ 대응 방법
Gogs를 최신 보안 패치가 적용된 0.14.3 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 0.14.3 미만인지 확인하여 취약 여부를 판단합니다.
curl -s http://<target-ip>:<port>/api/info | grep -i 'version' || echo 'Check Gogs version manually'