🔍 CVE-2026-61781

9.9
CVSS Score
CRITICAL
2026-09-18
2026-09-23 18:12
✅ 완료

🇰🇷 한글 설명

pg_partman 5.5.0 미만 버전에서 create_partition_time() 함수가 part_config.time_encoder 값을 적절한 인용 없이 동적 SQL에 삽입하는 취약점이 발견되었습니다. 권한이 있는 사용자가 악성 SQL을 설정값에 저장하면, 백그라운드 워커가 이를 슈퍼유저 권한으로 실행하여 데이터베이스 전체 장악 및 OS 명령 실행이 가능해집니다.

💡 쉬운 설명

데이터베이스 관리 도구의 설정값에 악성 코드를 숨겨두면, 시스템이 자동으로 관리 작업을 수행할 때 숨겨진 코드가 관리자 권한으로 실행되는 보안 결함입니다. 이를 통해 해커가 데이터베이스를 완전히 통제하거나 서버 자체를 조작할 수 있습니다.

🇺🇸 원문 (English)

pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, create_partition_time() reads the writable part_config.time_encoder text value and interpolates it without identifier quoting into a dynamically executed SELECT statement. A role with the documented partman_user INSERT and UPDATE privileges can store SQL rather than a function name. When pg_partman_bgw later creates a child partition for a text- or UUID-keyed set, the worker executes the stored SQL with pg_partman_bgw.role privileges, which default to PostgreSQL superuser. The persistent configuration row can repeatedly restore elevated access on later maintenance ticks, and successful exploitation can permit database-wide compromise and operating-system command execution as the PostgreSQL service account. This issue is fixed in version 5.5.0.

📍 영향받는 시스템

pg_partman versions prior to 5.5.0

⚔️ 공격 벡터

partman_user 권한을 가진 사용자가 part_config.time_encoder 설정값에 악성 SQL을 삽입하여 백그라운드 워커의 권한 상승을 유도

🛡️ 대응 방법

pg_partman을 5.5.0 버전 이상으로 즉시 업데이트하십시오.

🔧 검증 코드

출력된 버전 번호가 5.5.0 미만인 경우 해당 취약점에 노출된 상태입니다.

Shell / Script
psql -c "SELECT extversion FROM pg_extension WHERE extname = 'pg_partman';" 2>/dev/null

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

PostgreSQL