🇰🇷 한글 설명
Docker 18.09.4 미만 버전에서 'docker build' 명령어가 원격 git URL을 처리할 때 발생하는 취약점입니다. 공격자가 빌드 경로를 조작하여 git ref를 플래그로 오인하게 만듦으로써, git clone 명령에 명령어를 주입하고 실행 권한을 탈취할 수 있습니다.
💡 쉬운 설명
도커로 프로그램을 만들 때 외부 저장소 주소를 이용하는데, 이 주소에 악성 명령어를 섞어 넣으면 컴퓨터가 이를 명령으로 착각해 실행해버리는 문제입니다. 이를 통해 해커가 사용자의 컴퓨터에서 몰래 명령을 내릴 수 있습니다.
🇺🇸 원문 (English)
In Docker before 18.09.4, an attacker who is capable of supplying or manipulating the build path for the "docker build" command would be able to gain command execution. An issue exists in the way "docker build" processes remote git URLs, and results in command injection into the underlying "git clone" command, leading to code execution in the context of the user executing the "docker build" command. This occurs because git ref can be misinterpreted as a flag.
📍 영향받는 시스템
Docker versions prior to 18.09.4
⚔️ 공격 벡터
조작된 git URL을 'docker build' 명령의 인자로 제공하여 git clone 과정에서 명령 주입(Command Injection) 수행
🛡️ 대응 방법
Docker 버전을 18.09.4 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 18.09.4보다 낮으면 취약한 상태입니다.
docker version --format '{{.Server.Version}}' | grep -E '^(\d+\.)?(\d+\.)?(\d+\.)?([0-9]+)'