🇰🇷 한글 설명
ingress-nginx의 auth-proxy-set-headers Ingress annotation을 통해 nginx 설정에 임의 코드를 주입할 수 있는 취약점입니다. 이를 악용하면 ingress-nginx controller 권한으로 임의 코드 실행 및 클러스터 내 모든 Secret 정보를 탈취할 수 있습니다.
💡 쉬운 설명
Kubernetes의 nginx 진입점(ingress-nginx)을 제어하는 프로그램에 보안 구멍이 있습니다. 공격자가 이를 악용하면 서버의 비밀 정보를 모두 빼낼 수 있습니다.
🇺🇸 원문 (English)
A security issue was discovered in ingress-nginx where the `nginx.ingress.kubernetes.io/auth-proxy-set-headers` Ingress annotation can be used to inject 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.)
📍 영향받는 시스템
ingress-nginx controller (모든 버전, 특히 v1.10.0 이전)
⚔️ 공격 벡터
nginx.ingress.kubernetes.io/auth-proxy-set-headers annotation에 악의적 nginx 설정 코드 주입
🛡️ 대응 방법
ingress-nginx를 최신 보안 패치 버전으로 업그레이드하고 RBAC 정책으로 Ingress annotation 수정 권한 제한
🔧 검증 코드
현재 설치된 ingress-nginx 버전을 확인하여 보안 업데이트 필요 여부를 판단합니다.
kubectl get deployment -n ingress-nginx -o jsonpath='{.items[0].spec.template.spec.containers[0].image}' 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'