🇰🇷 한글 설명
Kubernetes의 ingress-nginx에서 mirror-target과 mirror-host Ingress annotation을 통해 nginx 설정에 임의 코드를 주입할 수 있는 보안 취약점입니다. 이를 통해 ingress-nginx 컨트롤러 컨텍스트에서 임의 코드 실행 및 클러스터 전체의 Secret 정보 유출이 가능합니다.
💡 쉬운 설명
Kubernetes의 nginx 설정에서 특정 부분이 제대로 검증되지 않아 악의적인 명령을 주입할 수 있습니다. 이를 악용하면 서버에서 원하지 않는 프로그램을 실행시키고 민감한 정보를 빼낼 수 있습니다.
🇺🇸 원문 (English)
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `mirror-target` and `mirror-host` Ingress annotations can be used to inject arbitrary configuration into nginx. This can lead to arbitrary code execution in the context of the ingress-nginx controller, and disclosure of Secrets accessible to the controller. (Note that in the default installation, the controller can access all Secrets cluster-wide.)
📍 영향받는 시스템
Kubernetes ingress-nginx controller (CVE 발표 전 모든 버전, 최신 패치 버전 미만)
⚔️ 공격 벡터
Ingress 리소스의 mirror-target 또는 mirror-host annotation에 임의의 nginx 설정 코드 주입
🛡️ 대응 방법
ingress-nginx를 최신 패치 버전으로 업데이트하고 Ingress annotation 입력값 검증 정책 적용
🔧 검증 코드
출력된 이미지 태그에서 버전을 확인하고 공식 보안 권고의 권장 버전과 비교하여 패치 필요 여부 판단
kubectl get deployment -n ingress-nginx ingress-nginx-controller -o jsonpath='{.spec.template.spec.containers[0].image}' 2>/dev/null