🇰🇷 한글 설명
오픈소스 자동화 배포 시스템인 Goploy 1.17.5 및 이전 버전에서 발생하는 취약점입니다. 특정 API가 요청된 프로젝트가 사용자의 네임스페이스에 속하는지 검증하지 않아, 공격자가 타인의 프로젝트 파일을 읽고 쓰거나 삭제할 수 있으며 Git 원격 URL을 조작하여 원격 코드 실행(RCE)을 유발할 수 있습니다.
💡 쉬운 설명
권한이 있는 사용자가 다른 사용자의 프로젝트에 몰래 침입하여 파일을 바꾸거나 삭제할 수 있는 보안 구멍입니다. 특히 프로젝트의 설정 주소를 바꿔치기하면 공격자가 원하는 악성 코드를 서버에서 실행하게 만들 수 있어 매우 위험합니다.
🇺🇸 원문 (English)
Goploy is an open-source automation deployment system. In versions 1.17.5 and prior, Project.AddFile, Project.EditFile, Project.RemoveFile, and Project.Edit in cmd/server/api/project/handler.go accept a project or project-file row id from the JSON body and act on it without checking that the project belongs to the caller's namespace. The corresponding model.ProjectFile.GetData and model.Project.GetData queries filter only by row id. A user holding the manager role (or any role that includes the FileSync / EditProject permission) in their own namespace can read, write, or delete files in any project across the install, and can rewrite any project's git remote URL by submitting the foreign id in the body. The git-URL primitive escalates to RCE on the next deploy because Edit runs git remote set-url on the project's working tree. At time of publication, there are no known publicly available patches.
📍 영향받는 시스템
Goploy 1.17.5 및 그 이전 모든 버전
⚔️ 공격 벡터
API 요청 시 프로젝트 ID를 조작하여 타인의 네임스페이스에 접근한 뒤 Git URL을 변경하여 RCE 수행
🛡️ 대응 방법
공식 패치가 출시될 때까지 해당 API 사용을 제한하거나, 네임스페이스 검증 로직이 포함된 보안 업데이트를 적용해야 함
🔧 검증 코드
출력된 버전 정보가 1.17.5 이하인지 확인하여 취약 여부를 판단합니다.
curl -s http://<target-ip>/api/project/info | grep -E 'version' || echo 'Version check required via manual inspection'