🇰🇷 한글 설명
Gogs의 /redirect 엔드포인트에서 백슬래시(\)를 포함한 타겟 URL을 처리할 때 발생하는 정규화 불일치 취약점입니다. 공격자는 이를 이용해 신뢰할 수 있는 Gogs 도메인에서 외부 공격자 사이트로 사용자를 리다이렉트시켜 피싱 공격을 수행할 수 있습니다.
💡 쉬운 설명
웹사이트의 주소 처리 방식 차이를 이용해, 사용자가 안전한 사이트에 있다고 믿게 만든 뒤 가짜 사이트로 몰아가는 공격입니다. 이를 통해 사용자의 개인정보를 훔치는 피싱 공격이 가능해집니다.
🇺🇸 원문 (English)
Gogs is an open source self-hosted Git service. Prior to 0.15.0+dev, an unauthenticated attacker can provide a backslash-containing target to the /redirect endpoint, and similar post-action redirect flows are also affected. internal/urlx/urlx.go IsSameSite validates a normalized form of the target while cmd/gogs/internal/web/web.go getRedirect and other callers use the original value in the Location response. This backslash normalization mismatch lets browsers interpret the Location value as a scheme-relative external URL, allowing links on a trusted Gogs domain to redirect victims to attacker-controlled content for phishing. This vulnerability is fixed in 0.15.0+dev.
📍 영향받는 시스템
Gogs 0.15.0+dev 미만 버전
⚔️ 공격 벡터
백슬래시(\)가 포함된 특수 URL을 /redirect 엔드포인트에 전달하여 브라우저의 리다이렉트 동작을 유도
🛡️ 대응 방법
Gogs를 0.15.0+dev 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전 정보가 0.15.0 미만인 경우 해당 취약점에 노출된 상태입니다.
curl -s http://<GOGS_HOST>/api/version | grep -E '0\.[0-1][0-4]'