🇰🇷 한글 설명
Dokku의 openresty-vhosts 플러그인에서 파일 이름을 처리할 때 발생하는 명령 주입 취약점입니다. 특정 디렉토리 내의 파일 이름에 작은따옴표를 포함하면, 배포 과정 중 eval 명령어가 이를 실행하여 호스트 시스템에서 임의의 명령을 수행할 수 있습니다.
💡 쉬운 설명
파일 이름을 조작하여 컴퓨터가 악성 명령을 실행하도록 만드는 보안 구멍이 발견되었습니다. 공격자가 특수한 이름의 파일을 올리면 서버의 제어권을 뺏길 수 있습니다.
🇺🇸 원문 (English)
Dokku is a docker-powered PaaS. Prior to 0.38.2, the openresty-vhosts plugin copies files from an app's openresty/http-includes/ git repository directory to the host and then interpolates their filenames, unescaped, into a single-quoted shell string that is later parsed by eval. A filename containing a single quote breaks the quoting and allows command substitution to execute arbitrary commands on the host as the dokku user during the app's next deploy. This vulnerability is fixed in 0.38.2.
📍 영향받는 시스템
Dokku openresty-vhosts plugin (version < 0.38.2)
⚔️ 공격 벡터
애플리케이션의 openresty/http-includes/ 디렉토리에 작은따옴표가 포함된 악성 파일명을 생성하여 배포(deploy)를 수행함
🛡️ 대응 방법
Dokku를 0.38.2 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력 결과가 Vulnerable이면 취약한 버전이며, Safe이면 안전한 버전입니다.
dokku version | grep -E '0\.[0-9]+\.[0-9]+' | awk '{print $2}' | awk -F. '{if ($1==0 && $2==38 && $3 < 2) print "Vulnerable"; else print "Safe"}'