🇰🇷 한글 설명
PHP 의존성 관리 도구인 Composer의 특정 버전에서 GitHub OAuth 토큰을 검증할 때 정규표현식 오류가 발생합니다. 이로 인해 GitHub Actions의 GITHUB_TOKEN 형식이 유효성 검사를 통과하지 못하고 UnexpectedValueException을 발생시키며, 해당 토큰이 stderr나 CI 로그에 노출될 수 있습니다.
💡 쉬운 설명
Composer가 GitHub 인증 토큰을 확인하는 과정에서 실수로 토큰의 일부를 로그에 남기는 보안 결함이 발견되었습니다. 이로 인해 중요한 인증 정보가 로그 파일에 노출되어 해커에게 탈취될 위험이 있습니다.
🇺🇸 원문 (English)
Composer is a dependency Manager for the PHP language. Prior to 1.10.28, 2.2.28, and 2.9.8, Composer\IO\BaseIO::loadConfiguration() validates GitHub OAuth tokens with the regex ^[.A-Za-z0-9_]+$ and interpolates rejected tokens into an UnexpectedValueException; GitHub Actions GITHUB_TOKEN values using the ghs_<id>_<base64url-JWT> format can contain -, fail validation, and be disclosed to stderr or CI logs. This issue is fixed in versions 1.10.28, 2.2.28, and 2.9.8.
📍 영향받는 시스템
Composer 1.10.28 미만, 2.2.28 미만, 2.9.8 미만 버전
⚔️ 공격 벡터
GitHub Actions 환경에서 특정 형식의 토큰을 사용할 때 발생하는 정보 노출 (Information Disclosure)
🛡️ 대응 방법
Composer를 최신 버전(1.10.28, 2.2.28, 2.9.8 이상)으로 업데이트하십시오.
🔧 검증 코드
출력 결과가 'Vulnerable'이면 취약한 버전이며, 'Safe'이면 보안 패치가 적용된 버전입니다.
composer --version | grep -E '1|2' | awk '{print $2}' | awk -F. '{if ($3 < 28 && $1 == 1) print "Vulnerable"; else if ($3 < 28 && $1 == 2 && $2 == 2) print "Vulnerable"; else if ($3 < 8 && $1 == 2 && $2 == 9) print "Vulnerable"; else print "Safe"}'