🇰🇷 한글 설명
OpenCost 1.121.0 미만 버전에서 POST /serviceKey 엔드포인트에 인증 절차가 누락되어 발생합니다. 공격자는 임의의 키 값을 전송하여 GCP 서비스 계정의 key.json 파일 내용을 조작할 수 있으며, 이를 통해 비용 수집을 방해하거나 공격자가 선택한 자격 증명을 사용하게 만들 수 있습니다.
💡 쉬운 설명
인증 없이 특정 명령을 내릴 수 있는 취약점으로, 공격자가 시스템의 중요한 설정 파일을 마음대로 바꿀 수 있습니다. 이로 인해 클라우드 비용 계산이 틀려지거나 공격자의 계정 정보가 사용될 위험이 있습니다.
🇺🇸 원문 (English)
OpenCost provides cost monitoring for Kubernetes workloads and cloud costs. Prior to 1.121.0, the POST /serviceKey endpoint in pkg/costmodel/router.go allows a network client to invoke AddServiceKey without mandatory authentication and submit an arbitrary key form value that is written to the GCP service-account key.json file returned by GetGCPAuthSecretFilePath in core/pkg/env/core.go. The attacker controls the file contents but not the CONFIG_PATH-derived directory, the key.json filename, or the file mode. Replacing the credential contents can disrupt GCP cost collection or cause OpenCost to use attacker-selected credentials, and the wildcard Access-Control-Allow-Origin response permits browser-assisted requests when the service is reachable from a browser. This issue is fixed in version 1.121.0.
📍 영향받는 시스템
OpenCost versions prior to 1.121.0
⚔️ 공격 벡터
인증되지 않은 네트워크 클라이언트가 POST /serviceKey 엔드포인트를 통해 임의의 데이터를 전송
🛡️ 대응 방법
OpenCost를 1.121.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
명령어 결과에 1.121.0 또는 그 이상의 버전이 표시되면 안전합니다.
opencost --version 2>/dev/null | grep -E '1.121.0|higher'