🇰🇷 한글 설명
PostgreSQL의 옵티마이저 통계가 사용자의 접근 제어를 우회하여 보호된 뷰와 행 보안 정책 내의 샘플 데이터를 노출하는 취약점입니다. 누수 연산자를 통해 히스토그램 및 최빈값 목록 등의 민감한 통계 정보에 접근할 수 있습니다.
💡 쉬운 설명
PostgreSQL 데이터베이스의 쿼리 최적화 통계가 접근 제한을 우회하여 숨겨진 데이터 정보를 노출합니다. 공격자는 특별한 함수를 만들어 볼 수 없어야 할 데이터의 통계 정보를 읽을 수 있습니다.
🇺🇸 원문 (English)
PostgreSQL optimizer statistics allow a user to read sampled data within a view that the user cannot access. Separately, statistics allow a user to read sampled data that a row security policy intended to hide. PostgreSQL maintains statistics for tables by sampling data available in columns; this data is consulted during the query planning process. Prior to this release, a user could craft a leaky operator that bypassed view access control lists (ACLs) and bypassed row security policies in partitioning or table inheritance hierarchies. Reachable statistics data notably included histograms and most-common-values lists. CVE-2017-7484 and CVE-2019-10130 intended to close this class of vulnerability, but this gap remained. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.
📍 영향받는 시스템
PostgreSQL 13.22, 14.19, 15.14, 16.10, 17.6 이전의 모든 버전
⚔️ 공격 벡터
누수 연산자(leaky operator)를 통해 뷰 ACL 및 행 보안 정책을 우회하여 옵티마이저 통계 데이터에 접근
🛡️ 대응 방법
PostgreSQL을 13.22, 14.19, 15.14, 16.10 또는 17.6 이상 버전으로 업그레이드
🔧 검증 코드
출력된 PostgreSQL 버전이 13.22 이상, 14.19 이상, 15.14 이상, 16.10 이상, 17.6 이상 중 해당하는지 비교하여 취약성 확인
psql --version 2>/dev/null | grep -oE '\([0-9]+\.[0-9]+' | grep -oE '[0-9]+\.[0-9]+'