🇰🇷 한글 설명
Gogs 0.14.3 및 이전 버전에서 인증된 사용자가 권한이 없는 비공개 저장소를 관찰할 수 있는 취약점이 발견되었습니다. Watch API 핸들러의 접근 제어 로직이 반대로 구현되어 있어, 공격자는 비공개 저장소를 팔로우함으로써 커밋 메시지, 브랜치 이름, 이슈 및 PR 상세 내용을 대시보드와 이메일로 탈취할 수 있습니다.
💡 쉬운 설명
로그인한 사용자라면 권한이 없는 비밀 저장소도 몰래 지켜볼 수 있는 보안 결함입니다. 저장소를 팔로우하면 해당 저장소의 업데이트 내용이 공격자의 화면과 이메일로 전송됩니다.
🇺🇸 원문 (English)
Gogs is an open source self-hosted Git service. In 0.14.3 and earlier, any authenticated user can watch a private repository they have no access to, because the access check in the Watch API handler is inverted. The code checks if repoCtx.ViewerCanRead() (returns 404 when the user CAN read) instead of if !repoCtx.ViewerCanRead() (return 404 when the user CANNOT read). Once watching, the attacker's dashboard activity feed shows commit messages, branch names, issue titles, and PR details from the private repository. If email notifications are enabled, the attacker also receives emails containing issue and comment content.
📍 영향받는 시스템
Gogs 0.14.3 및 그 이전의 모든 버전
⚔️ 공격 벡터
인증된 사용자가 권한이 없는 비공개 저장소의 Watch API를 호출하여 정보를 탈취함
🛡️ 대응 방법
Gogs를 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
명령어 결과로 버전 번호가 출력되면 취약한 버전이 설치되어 있는 상태입니다.
gogs --version 2>/dev/null | grep -E '0\.[0-9]+\.[0-9]+' | awk '$2 <= "0.14.3"'