🇰🇷 한글 설명
Grafana Operator에서 jsonnet 데이터 템플릿 언어를 처리하는 과정에서 경로 탐색 및 권한 상승 취약점이 발견되었습니다. 공격자가 악의적인 Dashboard 또는 LibraryPanel 리소스를 생성할 경우, Grafana Operator 매니저의 Kubernetes 서비스 어카운트 토큰을 탈취할 수 있습니다.
💡 쉬운 설명
Grafana 설정 파일을 만드는 과정에서 보안 허점이 있어, 나쁜 의도를 가진 사용자가 관리자의 권한을 훔칠 수 있는 문제입니다. 이를 통해 관리자 권한으로 클러스터 전체에 영향을 줄 수 있습니다.
🇺🇸 원문 (English)
We have released version 5.24.0 of the Grafana Operator. This patch includes a MEDIUM severity security fix for a path traversal/privilege escalation vulnerability in the Grafana Operator.
### Summary
The Grafana Operator supports loading dashboards & library panels using the jsonnet data templating language. The jsonnet expression is evaluated in the context of the operator manager pod.
### Impact
It is possible for a malicious user who can create Dashboard or LibraryPanel resources for a Grafana instance to obtain the Kubernetes service account token of the Grafana Operator manager.
### Affected versions
All Grafana Operator versions <= 5.23
### Solutions and mitigations
All installations should be upgraded as soon as possible.
As a workaround, the following ValidatingAdmissionPolicy prevent the creation or modification of jsonnet based resources:
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
name: "prevent-jsonnet-dashboards"
spec:
failurePolicy: Fail
matchConstraints:
resourceRules:
- apiGroups: ["grafana.integreatly.org"]
apiVersions: ["v1beta1"]
operations: ["CREATE", "UPDATE"]
resources: ["grafanadashboards", "grafanalibrarypanels"]
validations:
- expression: "!has(object.spec.jsonnetLib)"
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
name: "prevent-jsonnet-dashboards-clusterwide"
spec:
policyName: "prevent-jsonnet-dashboards"
validationActions: [Deny]
### Acknowledgement
We would like to thank Artem Cherezov for responsibly disclosing the vulnerability.
📍 영향받는 시스템
Grafana Operator 버전 5.23 이하의 모든 버전
⚔️ 공격 벡터
악의적인 jsonnet 표현식이 포함된 Dashboard 또는 LibraryPanel 리소스를 생성하여 Operator의 서비스 어카운트 토큰 탈취
🛡️ 대응 방법
Grafana Operator를 5.24.0 버전 이상으로 업그레이드하거나, ValidatingAdmissionPolicy를 사용하여 jsonnet 기반 리소스 생성을 차단
🔧 검증 코드
출력된 Grafana Operator의 VERSION 항목이 5.23 이하인지 확인
helm list -A | grep grafana-operator