🔍 CVE-2026-44477

9.9
CVSS Score
CRITICAL
2026-05-28
2026-07-15 02:21
✅ 완료

🇰🇷 한글 설명

CloudNativePG의 메트릭 익스포터가 PostgreSQL 연결 시 superuser 권한을 사용한 후 권한을 낮추는 과정에서 발생하는 취약점입니다. 공격자가 RESET ROLE 명령을 통해 superuser 권한을 복구하고, COPY ... TO PROGRAM 명령을 사용하여 Pod 내부에서 OS 수준의 프로세스를 실행할 수 있습니다.

💡 쉬운 설명

데이터베이스 관리 도구의 권한 설정 오류로 인해, 해커가 데이터베이스를 넘어 서버 자체를 조종할 수 있는 위험한 상태입니다. 이를 통해 해커는 서버에 악성 프로그램을 설치하거나 시스템을 장악할 수 있습니다.

🇺🇸 원문 (English)

CloudNativePG is a platform designed to manage PostgreSQL databases within Kubernetes environments. Prior to 1.29.1 and 1.28.3, the CloudNativePG metrics exporter opens its PostgreSQL connection as the postgres superuser via the pod-local Unix socket, then demotes the session with SET ROLE pg_monitor. SET ROLE changes only current_user; session_user remains postgres. Any SQL expression evaluated inside the scrape session can invoke RESET ROLE to recover real superuser privileges, then use COPY ... TO PROGRAM to spawn an OS-level subprocess as the postgres user inside the primary pod. The READ ONLY transaction flag does not block this; it gates writes to database state, not external processes. This vulnerability is fixed in 1.29.1 and 1.28.3.

📍 영향받는 시스템

CloudNativePG 1.29.1 및 1.28.3 미만 버전

⚔️ 공격 벡터

메트릭 수집 세션 내에서 SQL 명령(RESET ROLE 및 COPY TO PROGRAM)을 실행하여 권한 상승 및 원격 코드 실행

🛡️ 대응 방법

CloudNativePG를 1.29.1 또는 1.28.3 이상의 최신 버전으로 업데이트하십시오.

🔧 검증 코드

설치된 CloudNativePG의 버전 정보를 확인하여 취약한 버전(1.29.1/1.28.3 미만)인지 체크합니다.

Shell / Script
helm list -A | grep cloudnative-pg | awk '{print $1}' && kubectl get pods -A -l app.kubernetes.io/name=cloudnative-pg -o jsonpath='{.items[*].metadata.labels}'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

💻 영향받는 소프트웨어

Kubernetes