🇰🇷 한글 설명
Flux2의 특정 버전에서 악성 Kubeconfig를 통해 코드 주입이 발생하는 취약점이 발견되었습니다. 멀티테넌시 환경에서는 컨트롤러의 서비스 계정 권한을 이용한 권한 상승으로 이어질 수 있습니다.
💡 쉬운 설명
해커가 조작된 설정 파일을 보내 시스템에 몰래 명령어를 실행할 수 있는 보안 구멍입니다. 이로 인해 관리자 권한을 탈취당할 위험이 있습니다.
🇺🇸 원문 (English)
Flux2 is an open and extensible continuous delivery solution for Kubernetes. Flux2 versions between 0.1.0 and 0.29.0, helm-controller 0.1.0 to v0.19.0, and kustomize-controller 0.1.0 to v0.23.0 are vulnerable to Code Injection via malicious Kubeconfig. In multi-tenancy deployments this can also lead to privilege escalation if the controller's service account has elevated permissions. Workarounds include disabling functionality via Validating Admission webhooks by restricting users from setting the `spec.kubeConfig` field in Flux `Kustomization` and `HelmRelease` objects. Additional mitigations include applying restrictive AppArmor and SELinux profiles on the controller’s pod to limit what binaries can be executed. This vulnerability is fixed in kustomize-controller v0.23.0 and helm-controller v0.19.0, both included in flux2 v0.29.0
📍 영향받는 시스템
Flux2 0.1.0~0.29.0, helm-controller 0.1.0~v0.19.0, kustomize-controller 0.1.0~v0.23.0
⚔️ 공격 벡터
악성 Kubeconfig 파일을 이용한 코드 주입 공격
🛡️ 대응 방법
kustomize-controller v0.23.0 또는 helm-controller v0.19.0 이상(Flux2 v0.29.0 포함)으로 업데이트
🔧 검증 코드
출력된 버전이 취약한 범위(kustomize-controller v0.23.0 미만 또는 helm-controller v0.19.0 미만)에 해당하면 취약한 상태입니다.
flux --version | grep -E 'v0\.(1[0-9]|2[0-9])' || kubectl get deployments -n flux-system -o jsonpath='{.items[*].spec.template.spec.containers[*].image}' | grep -E 'fluxcd/kustomize-controller:v0\.(1[0-9]|2[0-3])|fluxcd/helm-controller:v0\.(1[0-9])'