🇰🇷 한글 설명
Ratify의 Azure 인증 제공자가 토큰 교환 시 대상 레지스트리가 실제 Azure Container Registry(ACR)인지 검증하지 않아, Entra ID 토큰이 악의적인 레지스트리로 노출될 수 있는 취약점입니다. 1.2.3 및 1.3.2 버전 이전에 영향을 받으며, 레지스트리 도메인 검증을 추가하여 해결되었습니다.
💡 쉬운 설명
Ratify가 클라우드 인증 토큰을 사용할 때 진짜 Azure 저장소인지 확인하지 않아서, 공격자가 가짜 저장소로 토큰을 보내도록 속일 수 있습니다. 이를 통해 토큰을 탈취하여 악용될 위험이 있습니다.
🇺🇸 원문 (English)
Ratify is a verification engine as a binary executable and on Kubernetes which enables verification of artifact security metadata and admits for deployment only those that comply with policies the user creates. In a Kubernetes environment, Ratify can be configured to authenticate to a private Azure Container Registry (ACR). The Azure workload identity and Azure managed identity authentication providers are configured in this setup. Users that configure a private ACR to be used with the Azure authentication providers may be impacted by a vulnerability that exists in versions prior to 1.2.3 and 1.3.2. Both Azure authentication providers attempt to exchange an Entra ID (EID) token for an ACR refresh token. However, Ratify’s Azure authentication providers did not verify that the target registry is an ACR. This could have led to the EID token being presented to a non-ACR registry during token exchange. EID tokens with ACR access can potentially be extracted and abused if a user workload contains an image reference to a malicious registry. As of versions 1.2.3 and 1.3.2, the Azure workload identity and Azure managed identity authentication providers are updated to add new validation prior to EID token exchange. Validation relies upon registry domain validation against a pre-configured list of well-known ACR endpoints. EID token exchange will be executed only if at least one of the configured well-known domain suffixes (wildcard support included) matches the registry domain of the image reference.
📍 영향받는 시스템
Ratify < 1.2.3 및 < 1.3.2 (Azure Workload Identity 또는 Azure Managed Identity 인증 제공자 사용)
⚔️ 공격 벡터
악의적인 컨테이너 이미지 참조를 포함한 워크로드를 통해 Entra ID 토큰을 비-ACR 레지스트리로 유도
🛡️ 대응 방법
Ratify를 1.2.3 이상 또는 1.3.2 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 1.2.3 이상이거나 1.3.2 이상이면 패치됨, 이하이면 취약함
kubectl get deployment -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.spec.template.spec.containers[*].image}{"\n"}{end}' 2>/dev/null | grep ratify | grep -oP 'ratify:v?\K[0-9.]+' || echo '설치 안됨'