🇰🇷 한글 설명
galaxy_ng의 레거시 역할 가져오기 API(v1) 내 do_git_checkout() 함수에서 커맨드 인젝션 취약점이 발견되었습니다. 검증되지 않은 git ref 이름(브랜치/태그명)이 shell=True 옵션과 함께 subprocess.run()을 통해 셸 명령어로 실행되어 원격 코드 실행이 가능합니다. 이 취약점은 GALAXY_ENABLE_LEGACY_ROLES 설정이 True로 활성화된 경우에만 영향을 받습니다.
💡 쉬운 설명
해커가 특수하게 조작된 이름의 브랜치나 태그를 만들면, 시스템이 이를 처리하는 과정에서 해커의 명령어를 대신 실행하게 됩니다. 다만, 시스템의 특정 레거시 기능이 켜져 있는 경우에만 공격이 가능합니다.
🇺🇸 원문 (English)
A command injection vulnerability was found in galaxy_ng. The do_git_checkout() function in the legacy role import API (v1) interpolates unsanitized git ref names (branch/tag names) into shell commands executed via subprocess.run() with shell=True. An authenticated user who controls a git repository can create a branch or tag with shell metacharacters in the name to achieve remote code execution on the pulp worker. The vulnerable endpoint is only reachable when GALAXY_ENABLE_LEGACY_ROLES is set to True, which is not the default configuration.
📍 영향받는 시스템
galaxy_ng (GALAXY_ENABLE_LEGACY_ROLES=True 설정 시)
⚔️ 공격 벡터
인증된 사용자가 셸 메타문자가 포함된 git 브랜치 또는 태그를 생성하여 명령어를 주입함
🛡️ 대응 방법
GALAXY_ENABLE_LEGACY_ROLES 설정을 False로 유지하거나, 해당 API의 입력값 검증 로직을 업데이트함
🔧 검증 코드
명령어 결과에 GALAXY_ENABLE_LEGACY_ROLES=True가 포함되어 있으면 취약한 설정 상태임
env | grep GALAXY_ENABLE_LEGACY_ROLES