🇰🇷 한글 설명
PostgreSQL JDBC 드라이버 42.7.4부터 42.7.13 버전에서 데이터 길이를 실제보다 크게 선언할 경우, 남은 공간을 0으로 채우는 대신 이전 통신에 사용된 버퍼의 잔여 데이터를 그대로 저장하는 취약점이 발견되었습니다. 이로 인해 커넥션 풀을 사용하는 환경에서 다른 사용자의 SQL 문이나 파라미터 값이 유출될 수 있습니다.
💡 쉬운 설명
데이터를 저장할 때 빈 공간을 깨끗이 지우지 않고 이전에 사용했던 흔적을 남겨두는 실수입니다. 공격자가 이 흔적을 읽어내면 다른 사람이 주고받은 중요한 정보나 비밀번호를 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
pgjdbc, the PostgreSQL JDBC Driver, versions 42.7.4 through 42.7.13 pads a value that is shorter than its declared length with bytes left in its send buffer instead of zeros, and the server stores those bytes as part of the value. The bytes are messages the driver sent earlier on the same connection: SQL text and parameter values of recent statements, which on a pooled connection can come from other requests. Each padded value can carry up to 8192 bytes of this traffic, or 16320 bytes on a connection with GSS encryption. The padding happens when an application declares a length larger than the data it supplies, through PreparedStatement.setObject with a ByteStreamWriter, CopyIn.writeToCopy, PGCopyOutputStream.write, LargeObject.write, or Blob.setBytes. The driver accepts these calls without an error. An attacker who can make the application store such a value and read it back can collect earlier traffic. Applications whose declared lengths always match their data are not affected. Versions 42.7.3 and earlier pad with zeros.
📍 영향받는 시스템
pgjdbc (PostgreSQL JDBC Driver) versions 42.7.4 through 42.7.13
⚔️ 공격 벡터
애플리케이션이 데이터 길이를 실제보다 크게 설정하여 저장하도록 유도한 뒤, 저장된 값을 다시 읽어 이전 통신 데이터를 수집
🛡️ 대응 방법
pgjdbc 드라이버를 취약점이 해결된 42.7.3 이하 버전 또는 최신 패치 버전으로 업데이트
🔧 검증 코드
명령어 결과에 취약한 버전 범위(42.7.4~42.7.13)가 나타나면 해당 라이브러리가 설치되어 있는 상태입니다.
mvn dependency:list | grep -E 'postgresql-jdbc|pgjdbc' | grep -E '42.7.[4-9]|42.7.1[0-3]'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server