🇰🇷 한글 설명
Kubernetes Local Path Provisioner 0.0.36 이전 버전에서 local-path-storage 네임스페이스의 local-path-config ConfigMap을 편집 가능한 악의적 사용자가 helperPod.yaml 템플릿에 privileged 모드, hostPath 볼륨, Linux 기능 등의 보안 관련 필드를 주입할 수 있습니다. PVC 작업 시 생성되는 HelperPod이 공격자가 제어하는 템플릿으로 호스트 루트 파일시스템이 마운트된 권한있는 상태로 실행되어 민감한 호스트 파일, 서비스 계정 토큰, 다른 테넌트의 볼륨 데이터 접근 또는 호스트 파일 수정이 가능합니다.
💡 쉬운 설명
Kubernetes 저장소 관리 프로그램에서 설정을 건드릴 수 있는 사용자가 특권 권한의 악의적 프로그램을 몰래 삽입할 수 있습니다. 이를 통해 서버의 모든 파일에 접근하거나 다른 사용자의 암호와 데이터를 탈취할 수 있습니다.
🇺🇸 원문 (English)
Local Path Provisioner provides a way for the Kubernetes users to utilize the local storage in each node. Prior to 0.0.36, a malicious user with permission to edit the local-path-config ConfigMap in the local-path-storage namespace can manipulate the helperPod.yaml template used by rancher/local-path-provisioner. The helperPod.yaml template is loaded by the provisioner and used to create HelperPods during PVC provisioning and cleanup operations. However, the template is not sufficiently validated before use. Security-sensitive fields such as securityContext.privileged, hostPath volumes, and Linux capabilities can be injected into the template. When a PVC operation triggers HelperPod creation, the provisioner creates the HelperPod using the attacker-controlled template. This can result in a privileged pod running on the target node with the host root filesystem mounted. This may allow the attacker to access sensitive host files, read ServiceAccount tokens from other pods on the same node, access other tenants' local-path volume data, or modify files on the host node. This vulnerability is fixed in 0.0.36.
📍 영향받는 시스템
rancher/local-path-provisioner < 0.0.36
⚔️ 공격 벡터
local-path-storage 네임스페이스 ConfigMap 편집 권한이 있는 공격자가 helperPod.yaml 템플릿을 조작하여 권한있는 Pod 생성
🛡️ 대응 방법
Local Path Provisioner을 0.0.36 이상으로 업그레이드하고 RBAC으로 ConfigMap 편집 권한 제한
🔧 검증 코드
반환된 이미지가 v0.0.36 이상인지 확인하거나 kubectl describe configmap local-path-config -n local-path-storage로 helperPod.yaml의 securityContext, hostPath, capabilities 주입 여부 점검
kubectl get deployment -n local-path-storage local-path-provisioner -o jsonpath='{.spec.template.spec.containers[0].image}'