🇰🇷 한글 설명
MariaDB Connector/J의 특정 설정 환경에서 인증 과정 중 인증서 검증이 이루어지기 전에 비밀번호가 전송되는 취약점이 발견되었습니다. 공격자가 중간자 공격(MitM)을 통해 자가 서명된 인증서를 제시하면, 애플리케이션이 데이터베이스 비밀번호를 공격자에게 노출할 수 있습니다.
💡 쉬운 설명
데이터베이스에 접속할 때 보안 인증서를 확인하기 전에 비밀번호를 먼저 보내버리는 허점이 있습니다. 이로 인해 해커가 중간에서 가짜 서버를 통해 사용자의 비밀번호를 가로챌 수 있습니다.
🇺🇸 원문 (English)
MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. Prior to 2.7.14, 3.3.5, 3.4.3, and 3.5.9, when a Java application connects with sslMode=verify-full or sslMode=verify-ca, supplies a password, and does not configure serverSslCert or trustStore, Connector/J can accept an untrusted self-signed certificate through the fallbackToSystemTrustStore=true ephemeral trust manager and record its certFingerprint for later identity binding. The OK-packet and authentication-switch paths enforce the certificate fingerprint, but the initial-handshake path does not. HandshakeResponse.encode() can therefore build and send a mysql_clear_password response before checking certFingerprint != null && !isMitMProof(), sslMode, or whether the authentication plugin is resistant to a man-in-the-middle, and the initial path also bypasses restrictedAuth. An active man-in-the-middle or hostile server can present a self-signed certificate, claim to be MariaDB, select mysql_clear_password as the initial authentication plugin, and receive the full database password before the connection is rejected. This issue is fixed in versions 2.7.14, 3.3.5, 3.4.3, and 3.5.9.
📍 영향받는 시스템
MariaDB Connector/J 2.7.14 미만, 3.3.5 미만, 3.4.3 미만, 3.5.9 미만 버전
⚔️ 공격 벡터
중간자 공격(Man-in-the-Middle)을 통해 가짜 MariaDB 서버를 구축하고 mysql_clear_password 플러그인을 유도하여 비밀번호 탈취
🛡️ 대응 방법
MariaDB Connector/J를 수정된 버전(2.7.14, 3.3.5, 3.4.3, 3.5.9 이상)으로 업데이트
🔧 검증 코드
출력된 라이브러리 버전이 취약한 버전 범위(2.7.14, 3.3.5, 3.4.3, 3.5.9 미만)에 해당하는지 확인
mvn dependency:list | grep -E 'mariadb-java-client:[0-9.]+'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server