🇰🇷 한글 설명
pg_partman 5.5.0 미만 버전에서 drop_partition_id() 및 drop_partition_time() 함수가 권한 검사를 우회하는 취약점이 발견되었습니다. partman_user 권한을 가진 사용자가 권한이 없는 스키마를 대상으로 지정하면, 백그라운드 워커가 슈퍼유저 권한으로 테이블 스키마를 강제로 변경할 수 있습니다. 이로 인해 보관된 자식 테이블이 승인되지 않은 스키마로 이동될 수 있습니다.
💡 쉬운 설명
데이터베이스 관리 도구의 권한 설정 오류로 인해, 일반 사용자가 허락되지 않은 영역으로 데이터를 마음대로 옮길 수 있는 문제입니다. 관리자 권한을 가진 프로그램이 사용자의 잘못된 명령을 그대로 실행하면서 발생하는 보안 허점입니다.
🇺🇸 원문 (English)
pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, drop_partition_id() and drop_partition_time() use part_config.retention_schema as the target for ALTER TABLE SET SCHEMA and accept any nonempty schema name. A role with partman_user access can select a target schema where the role lacks the normal CREATE privilege, and the background worker performs the relocation with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, bypassing the authorization check that a normal ALTER TABLE SET SCHEMA operation would enforce. This permits unauthorized relocation of retained child tables between schemas. This issue is fixed in version 5.5.0.
📍 영향받는 시스템
pg_partman version < 5.5.0
⚔️ 공격 벡터
partman_user 권한을 가진 계정이 권한이 없는 스키마 이름을 인자로 전달하여 백그라운드 워커의 슈퍼유저 권한을 악용
🛡️ 대응 방법
pg_partman을 5.5.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 5.5.0 미만이면 취약한 상태입니다.
psql -c "SELECT extversion FROM pg_extension WHERE extname = 'pg_partman';"