🇰🇷 한글 설명
GoCD 22.1.0 미만 버전에서 인증된 사용자가 악의적인 Mercurial 브랜치 이름을 설정하여 원격 코드 실행(RCE)을 수행할 수 있는 취약점입니다. 공격자는 Mercurial 훅 또는 별칭을 악용하여 명령 주입을 통해 서버 권한을 탈취할 수 있습니다.
💡 쉬운 설명
권한이 있는 사용자가 시스템 설정에 특수한 이름을 입력하여 서버를 마음대로 조종할 수 있는 보안 결함입니다. 이를 통해 해커가 서버에 악성 명령을 내려 시스템을 장악할 위험이 있습니다.
🇺🇸 원문 (English)
GoCD is a continuous delivery server. In GoCD versions prior to 22.1.0, it is possible for existing authenticated users who have permissions to edit or create pipeline materials or pipeline configuration repositories to get remote code execution capability on the GoCD server via configuring a malicious branch name which abuses Mercurial hooks/aliases to exploit a command injection weakness. An attacker would require access to an account with existing GoCD administration permissions to either create/edit (`hg`-based) configuration repositories; create/edit pipelines and their (`hg`-based) materials; or, where "pipelines-as-code" configuration repositories are used, to commit malicious configuration to such an external repository which will be automatically parsed into a pipeline configuration and (`hg`) material definition by the GoCD server. This issue is fixed in GoCD 22.1.0. As a workaround, users who do not use/rely upon Mercurial materials can uninstall/remove the `hg`/Mercurial binary from the underlying GoCD Server operating system or Docker image.
📍 영향받는 시스템
GoCD versions prior to 22.1.0
⚔️ 공격 벡터
Mercurial 기반의 파이프라인 재료 또는 구성 저장소의 브랜치 이름을 악의적으로 설정하여 명령 주입 수행
🛡️ 대응 방법
GoCD를 22.1.0 버전 이상으로 업데이트하거나, 사용하지 않는 경우 서버에서 hg/Mercurial 바이너리를 제거
🔧 검증 코드
명령어 결과에 표시된 버전이 22.1.0 이상이면 안전하며, 그 미만이면 취약한 상태입니다.
curl -s http://<GOCD_SERVER_URL>/api/version | grep -E '"version": "(2[2]\.[1-9]|[2-9]\.[0-9]+|[1-9][0-9]+\\.[0-9]+)"'