🇰🇷 한글 설명
kubectl cp 명령어가 컨테이너 내의 tar 바이너리를 사용하여 파일을 복사할 때, 악성 tar 파일을 통해 사용자 로컬 머신에 임의의 파일을 생성하거나 심볼릭 링크를 따라갈 수 있는 취약점입니다. 공격자는 이를 이용해 로컬 사용자의 권한 범위 내에서 시스템의 임의 경로에 파일을 쓸 수 있습니다. 이 문제는 kubectl v1.11.9, v1.12.7, v1.13.5, v1.14.0 이후 버전에서 해결되었습니다.
💡 쉬운 설명
컨테이너에 있는 파일을 내 컴퓨터로 가져올 때, 가짜 파일을 이용해 내 컴퓨터의 중요한 파일을 마음대로 조작할 수 있는 문제입니다. 해커가 만든 특수한 압축 파일을 실행하면 내 컴퓨터에 몰래 파일을 심을 수 있습니다.
🇺🇸 원문 (English)
The kubectl cp command allows copying files between containers and the user machine. To copy files from a container, Kubernetes creates a tar inside the container, copies it over the network, and kubectl unpacks it on the user’s machine. If the tar binary in the container is malicious, it could run any code and output unexpected, malicious results. An attacker could use this to write files to any path on the user’s machine when kubectl cp is called, limited only by the system permissions of the local user. The untar function can both create and follow symbolic links. The issue is resolved in kubectl v1.11.9, v1.12.7, v1.13.5, and v1.14.0.
📍 영향받는 시스템
kubectl v1.11.9, v1.12.7, v1.13.5, v1.14.0 미만 버전
⚔️ 공격 벡터
컨테이너 내부에 악성 tar 바이너리를 배치한 후 사용자가 kubectl cp 명령을 실행하도록 유도
🛡️ 대응 방법
kubectl을 최신 보안 패치가 적용된 버전(v1.11.9, v1.12.7, v1.13.5, v1.14.0 이상)으로 업데이트
🔧 검증 코드
출력된 GitVersion이 취약점이 해결된 버전(v1.11.9, v1.12.7, v1.13.5, v1.14.0 이상)인지 확인
kubectl version --client | grep -E 'Build Date|GitVersion'