🇰🇷 한글 설명
PostgreSQL 7.4.x~8.4.x 버전에서 X.509 인증서 CN 필드의 널 문자(\0)를 제대로 검증하지 못하는 취약점입니다. 공격자가 정상 CA로부터 발급받은 조작된 인증서로 PostgreSQL 서버를 스푸핑하거나 클라이언트 인증서를 통해 호스트 접근 제한을 우회할 수 있습니다.
💡 쉬운 설명
데이터베이스 보안 인증서 검증 시 특수 문자(\0)를 제대로 처리하지 못합니다. 이를 악용하면 가짜 데이터베이스 서버로 위장하거나 접근 권한 검사를 우회할 수 있습니다.
🇺🇸 원문 (English)
PostgreSQL 7.4.x before 7.4.27, 8.0.x before 8.0.23, 8.1.x before 8.1.19, 8.2.x before 8.2.15, 8.3.x before 8.3.9, and 8.4.x before 8.4.2 does not properly handle a '\0' character in a domain name in the subject's Common Name (CN) field of an X.509 certificate, which (1) allows man-in-the-middle attackers to spoof arbitrary SSL-based PostgreSQL servers via a crafted server certificate issued by a legitimate Certification Authority, and (2) allows remote attackers to bypass intended client-hostname restrictions via a crafted client certificate issued by a legitimate Certification Authority, a related issue to CVE-2009-2408.
📍 영향받는 시스템
PostgreSQL 7.4.x(~7.4.26), 8.0.x(~8.0.22), 8.1.x(~8.1.18), 8.2.x(~8.2.14), 8.3.x(~8.3.8), 8.4.x(~8.4.1)
⚔️ 공격 벡터
정상 CA로부터 발급받은 CN 필드에 널 바이트를 포함한 조작된 서버/클라이언트 인증서를 이용한 중간자 공격 및 인증 우회
🛡️ 대응 방법
PostgreSQL을 각 시리즈의 패치 버전 이상으로 업그레이드 (7.4.27+, 8.0.23+, 8.1.19+, 8.2.15+, 8.3.9+, 8.4.2+)
🔧 검증 코드
출력된 PostgreSQL 버전이 각 시리즈별 최소 버전 이상인지 확인하여 패치 적용 여부 판단
psql --version 2>/dev/null || postgres --version 2>/dev/null || dpkg -l postgresql 2>/dev/null | grep -i postgresql