🇰🇷 한글 설명
PostgreSQL의 악의적인 슈퍼유저가 pg_dump와 pg_dumpall 덤프에 신뢰할 수 없는 데이터를 포함시켜 복원 시 psql 메타-커맨드를 통한 임의의 코드 실행이 가능합니다. 클라이언트 운영체제 계정 권한으로 실행되므로 높은 위험성을 가집니다.
💡 쉬운 설명
PostgreSQL 백업 도구에 악의적인 관리자가 숨겨진 명령어를 심을 수 있습니다. 백업을 복원할 때 이 명령어들이 자동으로 실행되어 사용자 컴퓨터에서 해로운 작업을 수행할 수 있습니다.
🇺🇸 원문 (English)
Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. This is similar to MySQL CVE-2024-21096. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.
📍 영향받는 시스템
PostgreSQL 17.6, 16.10, 15.14, 14.19, 13.22 이전 모든 버전
⚔️ 공격 벡터
악의적인 슈퍼유저가 pg_dump/pg_dumpall 덤프 파일에 psql 메타-커맨드를 주입하여 복원 시 임의 코드 실행
🛡️ 대응 방법
PostgreSQL을 17.6, 16.10, 15.14, 14.19, 13.22 이상의 패치된 버전으로 업그레이드
🔧 검증 코드
설치된 PostgreSQL 버전이 패치된 버전(13.22+, 14.19+, 15.14+, 16.10+, 17.6+)인지 확인합니다. 출력이 없으면 취약한 버전입니다.
psql --version | grep -E 'psql \(PostgreSQL\) (1[78]|1[456]|13)'