🇰🇷 한글 설명
Tekton Pipelines의 git resolver에서 revision 파라미터가 입력값 검증 없이 git fetch에 직접 전달되어, 공격자가 '-'로 시작하는 git 플래그를 주입할 수 있습니다. 로컬 파일시스템 경로를 악용하면 resolver pod에서 임의의 바이너리를 실행 가능하며, 높은 권한의 ServiceAccount로 인해 전 클러스터의 Secret이 탈취됩니다.
💡 쉬운 설명
Tekton이라는 쿠버네티스 CI/CD 도구의 git 기능에서 특수한 명령어를 주입하면 공격자가 시스템 명령을 실행할 수 있습니다. 이를 통해 클러스터의 모든 비밀 정보(Secret)를 탈취할 수 있습니다.
🇺🇸 원문 (English)
Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. Starting in version 1.0.0 and prior to versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1, the git resolver's revision parameter is passed directly as a positional argument to git fetch without any validation that it does not begin with a - character. Because git parses flags from mixed positional arguments, an attacker can inject arbitrary git fetch flags such as --upload-pack=<binary>. Combined with the validateRepoURL function explicitly permitting URLs that begin with / (local filesystem paths), a tenant who can submit ResolutionRequest objects can chain these two behaviors to execute an arbitrary binary on the resolver pod. The tekton-pipelines-resolvers ServiceAccount holds cluster-wide get/list/watch on all Secrets, so code execution on the resolver pod enables full cluster-wide secret exfiltration. Versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1 fix the issue.
📍 영향받는 시스템
Tekton Pipelines 1.0.0~1.11.0 (1.0.2, 1.3.4, 1.6.2, 1.9.3, 1.11.1 제외)
⚔️ 공격 벡터
ResolutionRequest 제출 권한 있는 테넌트가 revision 파라미터에 '--upload-pack=<바이너리>' 형태의 git 플래그를 주입하여 resolver pod 내에서 임의 코드 실행
🛡️ 대응 방법
Tekton Pipelines를 1.0.2, 1.3.4, 1.6.2, 1.9.3, 1.11.1 이상으로 즉시 업그레이드
🔧 검증 코드
tekton-pipelines-resolvers pod가 실행 중이면 설치 여부 확인, 'Image:' 항목에서 버전 확인 후 취약 버전(1.0.0~1.11.0 제외 버전)에 해당하면 즉시 패치 필요
kubectl get pods -A --field-selector=metadata.namespace!=kube-system | grep tekton && kubectl describe deployment -A | grep -i 'image.*tekton'