🇰🇷 한글 설명
Dokku 0.38.2 미만 버전에서 앱 이름 검증 정규식이 쉘 메타문자를 허용하는 취약점이 발견되었습니다. 인증된 사용자가 특수 문자가 포함된 앱 이름을 사용하여 git push를 시도할 경우, bash pre-receive hook 스크립트 내에서 임의의 명령어가 실행될 수 있습니다.
💡 쉬운 설명
Dokku라는 서비스에서 앱 이름을 만들 때, 이름에 몰래 명령어를 섞어 넣으면 서버가 이를 실행해버리는 보안 구멍이 있습니다. 공격자가 이 이름을 이용해 서버의 권한을 탈취할 수 있습니다.
🇺🇸 원문 (English)
Dokku is a docker-powered PaaS. Prior to 0.38.2, the app name validation regex (^[a-z0-9][^/:_A-Z]*$) permits shell metacharacters. When an authenticated user pushes to a git remote with a crafted app name, the name is embedded unquoted into a bash pre-receive hook script via an unquoted heredoc (<<EOF instead of <<'EOF') in fn-git-create-hook() at plugins/git/internal-functions:378. On git push, bash interprets the semicolon as a command separator, executing arbitrary commands as the dokku user. This vulnerability is fixed in 0.38.2.
📍 영향받는 시스템
Dokku versions prior to 0.38.2
⚔️ 공격 벡터
인증된 사용자가 특수 문자가 포함된 조작된 앱 이름을 사용하여 git push를 수행
🛡️ 대응 방법
Dokku를 0.38.2 버전 이상으로 업데이트하십시오.
🔧 검증 코드
명령어 결과로 버전 정보가 출력되면 취약한 버전이 설치되어 있는 상태입니다.
dokku --version | grep -E '0\.[0-9]+\.[0-9]+' | awk '$2 < "0.38.2"'