🇰🇷 한글 설명
GitHub Enterprise Server의 OAuth 리디렉션 URI 검증에서 부정확한 정규표현식으로 인한 우회 취약점입니다. 공격자가 등록된 콜백 URL을 알고 있으면 악성 인증 링크를 통해 피해자를 공격자의 도메인으로 리디렉션하여 OAuth 인증 코드를 탈취할 수 있습니다. 이를 통해 피해자 계정의 모든 권한으로 접근이 가능합니다.
💡 쉬운 설명
GitHub 로그인 시스템에서 보안 검사가 제대로 작동하지 않아 공격자가 위조된 링크로 사용자를 속일 수 있습니다. 피해자가 링크를 클릭하면 공격자가 사용자 계정의 접근 권한을 탈취하게 됩니다.
🇺🇸 원문 (English)
An incorrect regular expression vulnerability was identified in GitHub Enterprise Server that allowed an attacker to bypass OAuth redirect URI validation. An attacker with knowledge of a first-party OAuth application's registered callback URL could craft a malicious authorization link that, when clicked by a victim, would redirect the OAuth authorization code to an attacker-controlled domain. This could allow the attacker to gain unauthorized access to the victim's account with the scopes granted to the OAuth application. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.21 and was fixed in versions 3.20.1, 3.19.5, 3.18.8, 3.17.14, 3.16.17, 3.15.21, 3.14.26. This vulnerability was reported via the GitHub Bug Bounty program.
📍 영향받는 시스템
GitHub Enterprise Server 3.21 이전 모든 버전 (3.20.0, 3.19.4 이하, 3.18.7 이하 등)
⚔️ 공격 벡터
공격자가 미리 등록된 OAuth 콜백 URL을 이용하여 악성 인증 링크를 생성한 후 피해자에게 전송하면, 피해자의 인증 코드를 탈취 가능
🛡️ 대응 방법
GitHub Enterprise Server를 3.20.1, 3.19.5, 3.18.8, 3.17.14, 3.16.17, 3.15.21 또는 3.14.26 이상으로 업그레이드
🔧 검증 코드
현재 GitHub Enterprise Server 버전을 확인하여 3.21 이상이면 안전하고, 그 이하 버전이면 패치 적용 필요
curl -s -k https://localhost/api/v3/meta 2>/dev/null | grep -oP '"version":\s*"\K[^"]+' || ssh admin@localhost ghe-version 2>/dev/null