🇰🇷 한글 설명
GitHub CLI(gh) 2.97.0 미만 버전에서 특정 세밀한 권한의 개인 액세스 토큰(PAT) 및 GitHub App 토큰의 마스킹 처리가 불완전한 취약점이 발견되었습니다. 이로 인해 gh auth status 명령 실행 시 토큰의 일부가 터미널이나 CI 출력 로그에 노출될 수 있습니다. 해당 문제는 2.97.0 버전에서 수정되었습니다.
💡 쉬운 설명
GitHub 명령 도구를 사용할 때 보안을 위해 가려져야 할 비밀번호(토큰)의 일부가 화면이나 로그에 그대로 노출될 수 있는 문제입니다. 이로 인해 다른 사람이 내 계정 권한을 훔쳐볼 위험이 있습니다.
🇺🇸 원문 (English)
GitHub CLI (gh) is GitHub's official command line tool. Prior to version 2.97.0, gh auth status masked only the characters after the last underscore in certain fine-grained personal access tokens and GitHub App tokens. As a result, part of an affected token could appear in terminal or CI output that is captured or shared. Authenticated users are affected if they ran gh auth status (without the --show-token flag) with a token type whose format contains an underscore after the prefix. This includes fine-grained personal access tokens (github_pat_*) and GitHub App installation and user access tokens (ghs_*, ghu_*; for example, ghs_<APPID>_<JWT>), as well as the Actions GITHUB_TOKEN. Classic tokens such as gho_* and ghp_* have an underscore-free body and are not affected. This issue is fixed in version 2.97.0.
📍 영향받는 시스템
GitHub CLI (gh) version 2.97.0 미만
⚔️ 공격 벡터
터미널 기록이나 CI/CD 로그 파일에 노출된 토큰의 일부를 탈취하여 권한을 오용
🛡️ 대응 방법
GitHub CLI를 최신 버전인 2.97.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.97.0보다 낮으면 취약한 상태이며, 2.97.0 이상이면 안전합니다.
gh --version | grep -E 'gh version [0-9]+\.[0-9]+\.[0-9]+'