🇰🇷 한글 설명
Gitea의 내장 SSH 서버가 활성화된 경우, 공개 키를 SQL `LIKE` 비교 방식으로 조회하여 대소문자를 구분하지 않는 데이터베이스(SQLite 등)에서 보안 취약점이 발생합니다. 공격자가 다른 사용자의 RSA 공개 키와 대소문자만 다른 변형된 키를 생성하고 해당 키의 개인키를 보유할 경우, 피해자의 계정으로 SSH 인증을 통과할 수 있습니다.
💡 쉬운 설명
SSH 로그인 시 사용하는 암호 키를 확인하는 과정에서 대소문자를 구분하지 않는 오류가 발견되었습니다. 이를 악용하면 다른 사람의 계정으로 몰래 접속할 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
When Gitea's built-in SSH server is enabled (`START_SSH_SERVER = true`), the presented public key was looked up with an SQL `LIKE` comparison of its encoded content, which is case-insensitive on some databases, including the default SQLite. An attacker who can construct a case variant of another user's registered RSA public key for which they can derive the private key could have that key matched to the victim's account and authenticate over SSH as that user. Keys are now looked up by fingerprint.
📍 영향받는 시스템
Gitea (START_SSH_SERVER = true 설정이 활성화된 버전)
⚔️ 공격 벡터
피해자의 공개 키와 대소문자만 다른 변형된 키를 생성하여 SSH 인증 우회
🛡️ 대응 방법
Gitea를 최신 보안 패치가 적용된 버전으로 업데이트하여 키 조회 방식을 지문(fingerprint) 기반으로 변경하십시오.
🔧 검증 코드
출력된 Gitea 버전을 확인하여 해당 취약점이 해결된 최신 버전인지 확인하십시오.
gitea --version 2>/dev/null || echo 'Gitea not found'