🇰🇷 한글 설명
Gogs 오픈소스 Git 서비스의 0.14.3 이전 버전에서 오픈 리다이렉트 취약점이 발견되었습니다. IsSameSite 함수가 URL의 앞 두 글자만 검사하는 결함이 있어, 디렉토리 트래버설 시퀀스와 백슬래시를 이용해 검증을 우회하고 임의의 외부 사이트로 사용자를 리다이렉트할 수 있습니다.
💡 쉬운 설명
Gogs 서비스의 주소를 이용해 사용자를 가짜 사이트로 몰아가는 공격이 가능합니다. 보안 검사를 우회하는 특수한 주소 형식을 사용하여 정상적인 사이트인 것처럼 속일 수 있습니다.
🇺🇸 원문 (English)
Gogs is an open source self-hosted Git service. Prior to 0.14.3, an open redirect vulnerability exists in Gogs where attacker-controlled redirect_to parameters can bypass validation, allowing redirection to arbitrary external sites. All redirects in Gogs that are validated via the IsSameSite function are vulnerable. The function only inspects the first two characters of the URL string. This check fails to account for directory traversal sequences followed by backslashes. This vulnerability is fixed in 0.14.3.
📍 영향받는 시스템
Gogs 0.14.3 미만 모든 버전
⚔️ 공격 벡터
redirect_to 파라미터에 디렉토리 트래버설 및 백슬래시를 포함한 조작된 URL을 입력하여 검증 우회
🛡️ 대응 방법
Gogs를 최신 보안 패치가 적용된 0.14.3 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전 정보가 0.14.3 미만인 경우 해당 취약점에 노출된 상태입니다.
curl -s http://<GOGS_HOST>/api/info | grep -E 'version' || echo 'Check version via web UI or logs'