🇰🇷 한글 설명
pglogical의 큐 메커니즘이 발행자로부터 전달된 메시지 페이로드를 구독자 측의 apply worker 권한으로 실행하는 취약점입니다. 공격자가 조작된 메시지를 보내면 구독자 측에서 슈퍼유저 권한으로 임의의 SQL이 실행되어 권한 상승 및 테넌트 간 격리 파괴가 발생할 수 있습니다. 특히 구독 생성 권한이 비슈퍼유저에게 위임된 관리형 환경에서 위험합니다.
💡 쉬운 설명
데이터를 복제하는 과정에서 악성 명령어가 포함된 메시지를 보내면, 데이터베이스 관리자 권한을 탈취할 수 있는 보안 결함입니다. 이를 통해 공격자는 권한이 없는 사용자라도 데이터베이스 전체를 제어할 수 있게 됩니다.
🇺🇸 원문 (English)
The pglogical queue mechanism, used to convey out-of-band commands such as replicated DDL from a publisher to a subscriber, executes message payloads on the subscriber at the privilege level of the apply worker, which is equivalent to a PostgreSQL superuser in default installations. A party acting as the publisher can send crafted queue messages that cause arbitrary SQL to be executed on the subscriber as superuser, escalating from a role permitted to use pglogical to full superuser and breaking the isolation between tenants in shared deployments. To exploit the issue an attacker must be able to direct a subscription at an endpoint they control. In default installations this requires privileges normally reserved for a superuser, so the issue is most relevant to managed deployments where the ability to create subscriptions has been delegated to non-superuser roles.
📍 영향받는 시스템
pglogical 확장을 사용하는 PostgreSQL 환경 (구독 생성 권한이 위임된 관리형 서비스 포함)
⚔️ 공격 벡터
공격자가 제어하는 엔드포인트로 구독을 유도하여 조작된 큐 메시지를 전송
🛡️ 대응 방법
pglogical 확장을 최신 보안 패치 버전으로 업데이트하고, 비슈퍼유저에게 구독 생성 권한 부여를 최소화함
🔧 검증 코드
출력된 pglogical의 버전이 보안 패치가 적용된 최신 버전인지 확인하십시오.
psql -c "SELECT extname, extversion FROM pg_extension WHERE extname = 'pglogical';"