🇰🇷 한글 설명
Kubernetes ingress-nginx의 auth-tls-match-cn Ingress annotation을 통해 nginx 설정에 임의의 코드를 주입할 수 있는 취약점입니다. 이를 통해 ingress-nginx 컨트롤러 컨텍스트에서 임의의 코드 실행 및 접근 가능한 Secrets 노출이 발생할 수 있습니다.
💡 쉬운 설명
Kubernetes의 ingress-nginx에서 특정 설정값을 잘못 처리하여 해커가 악의적인 코드를 실행할 수 있습니다. 이를 통해 시스템의 민감한 정보(암호, 토큰 등)에 접근할 수 있습니다.
🇺🇸 원문 (English)
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-cn` 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.)
📍 영향받는 시스템
kubernetes/ingress-nginx (모든 버전, 공식 보안 권고에서 확인된 패치 버전까지)
⚔️ 공격 벡터
Ingress 리소스에 악의적인 auth-tls-match-cn annotation 값을 설정하여 nginx 설정 주입 수행
🛡️ 대응 방법
ingress-nginx를 최신 패치 버전으로 즉시 업그레이드하고 RBAC 정책으로 untrusted source의 Ingress 리소스 생성 제한
🔧 검증 코드
현재 배포된 ingress-nginx 버전을 확인하여 공식 권고 패치 버전 이상인지 검증합니다.
kubectl get deployment -n ingress-nginx ingress-nginx-controller -o jsonpath='{.spec.template.spec.containers[0].image}' 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'