🇰🇷 한글 설명
pgjdbc PostgreSQL JDBC 드라이버의 SCRAM-SHA-256 인증 중 악의적 서버가 매우 큰 반복 횟수를 지정하여 클라이언트가 PBKDF2 계산에 무제한의 CPU 시간을 소모하도록 하는 거부 서비스 취약점입니다. loginTimeout 옵션으로도 완전히 완화되지 않으며, 스레드가 계속 CPU를 소모하여 연결 풀을 고갈시킬 수 있습니다.
💡 쉬운 설명
Java로 PostgreSQL에 접속할 때 악의적인 서버가 비정상적으로 복잡한 암호 검증을 수행하도록 속여서 컴퓨터의 CPU를 과도하게 사용하게 합니다. 이를 반복하면 프로그램이 완전히 먹통이 될 수 있습니다.
🇺🇸 원문 (English)
pgjdbc is an open source postgresql JDBC Driver. From version 42.2.0 to before version 42.7.11, pgjdbc is vulnerable to a client-side denial of service during SCRAM-SHA-256 authentication. A malicious server can instruct the driver to perform SCRAM authentication with a very large iteration count. With a large enough value, the client spends an unbounded amount of CPU time inside PBKDF2 before authentication can fail. A single attempt ties up a CPU core. Repeated or concurrent attempts exhaust client CPU and can wedge connection pools. In affected versions, loginTimeout did not fully mitigate this problem. When loginTimeout expired, the caller could stop waiting, but the worker thread performing the connection attempt could continue running and burning CPU inside the SCRAM PBKDF2 computation. This issue has been patched in version 42.7.11.
📍 영향받는 시스템
pgjdbc 42.2.0 ~ 42.7.10 버전
⚔️ 공격 벡터
악의적인 PostgreSQL 서버가 SCRAM 인증 중 매우 높은 반복 횟수 값을 전송하여 클라이언트의 PBKDF2 계산을 강제로 오래 실행
🛡️ 대응 방법
pgjdbc를 42.7.11 이상 버전으로 업그레이드
🔧 검증 코드
명령어 실행 결과가 42.7.11 이상이면 안전, 42.7.10 이하면 업그레이드 필요
find ~/.m2 -name 'postgresql-*.jar' 2>/dev/null | grep -oP 'postgresql-\K[^/]+(?=\.jar)' | sort -V | tail -1