🔍 CVE-2017-12172

6.7
CVSS Score
MEDIUM
2017-11-22
2026-10-15 16:17
✅ 완료

🇰🇷 한글 설명

PostgreSQL 데이터베이스 슈퍼유저가 심볼릭 링크를 이용하여 권한 상승 공격을 수행할 수 있는 취약점입니다. 시스템 부팅 시 root 권한으로 실행되는 PostgreSQL 시작 스크립트가 로그 파일을 열 때 슈퍼유저가 대체한 심볼릭 링크를 따라가면서, 공격자가 root 권한을 탈취할 수 있습니다.

💡 쉬운 설명

PostgreSQL의 관리자가 특수한 파일 기법을 악용하여 컴퓨터의 최고 권한을 얻을 수 있는 문제입니다. 시스템이 시작될 때 실행되는 PostgreSQL 시작 프로그램의 보안 결함을 노리는 공격입니다.

🇺🇸 원문 (English)

PostgreSQL 10.x before 10.1, 9.6.x before 9.6.6, 9.5.x before 9.5.10, 9.4.x before 9.4.15, 9.3.x before 9.3.20, and 9.2.x before 9.2.24 runs under a non-root operating system account, and database superusers have effective ability to run arbitrary code under that system account. PostgreSQL provides a script for starting the database server during system boot. Packages of PostgreSQL for many operating systems provide their own, packager-authored startup implementations. Several implementations use a log file name that the database superuser can replace with a symbolic link. As root, they open(), chmod() and/or chown() this log file name. This often suffices for the database superuser to escalate to root privileges when root starts the server.

📍 영향받는 시스템

PostgreSQL 10.0 이하, 9.6.5 이하, 9.5.9 이하, 9.4.14 이하, 9.3.19 이하, 9.2.23 이하

⚔️ 공격 벡터

데이터베이스 슈퍼유저가 로그 파일 경로를 심볼릭 링크로 대체하여 root가 시스템 파일 권한을 변경하도록 유도한 후 권한 탈취

🛡️ 대응 방법

영향받는 PostgreSQL 버전을 패치된 버전(10.1+, 9.6.6+, 9.5.10+, 9.4.15+, 9.3.20+, 9.2.24+)으로 즉시 업그레이드

🔧 검증 코드

버전이 10.1 이상, 9.6.6 이상, 9.5.10 이상 등으로 표시되면 패치됨. 낮은 버전이면 즉시 업그레이드 필요

Shell / Script
psql --version 2>/dev/null | grep -oE '\b(1[0-9]|9\.[0-9])' | head -1

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

PostgreSQL