🇰🇷 한글 설명
Progressive Robot hMailServer 6.2.0~6.3.3에서 MySQL/MariaDB 사용 시, SASL PLAIN 로그인 사용자명에 BMP 외부 문자(4바이트 UTF-8)가 포함되면 자동 차단 규칙 저장이 실패하여 원격 공격자가 단일 IP에서 계정 비밀번호를 무제한으로 대입할 수 있습니다. 실패 로그는 서버 오류 로그에만 기록됩니다.
💡 쉬운 설명
hMailServer가 특정 문자가 포함된 사용자 이름의 로그인 실패를 차단 목록에 저장하지 못해, 공격자가 같은 주소에서 비밀번호를 계속 시도할 수 있습니다. 공격자는 이 방식으로 차단을 우회하며 계정을 노릴 수 있습니다.
🇺🇸 원문 (English)
The auto-ban of Progressive Robot hMailServer 6.2.0 through 6.3.3, with a MySQL or MariaDB database, can be kept from banning an address after repeated failed logons, which allows a remote unauthenticated attacker to go on guessing account passwords from a single address without being banned. The server makes its MySQL tables in MySQL's utf8 character set, which holds no character outside the Basic Multilingual Plane, sends its statements as UTF-8 over a utf8mb4 connection and leaves the database's default strict mode in place. From 6.2.0 it decodes the user name of a SASL PLAIN logon as UTF-8, so the name can hold such a character. When the failed logons counted from one address reach MaxInvalidLogonAttempts (3 by default), the server clears that address's count, saves an IP range named "Auto-ban: " followed by the user name of the logon that reached the limit, and drops the connection. If such a character is in the part of the user name that the range's name keeps (the name is cut to 100 characters), the database refuses the range: no range is saved, the address is not refused, and, its count having already been cleared, it is given the next full set of attempts. An attacker can in this way spend all but the last attempt of each set on password guesses, and make the last under such a name. On Windows, POP3 AUTH PLAIN reaches it on a server as installed, and IMAP AUTHENTICATE PLAIN where IMAP SASL authentication is turned on (off by default); on Windows and on Linux (from 6.3.0), SMTP AUTH PLAIN reaches it where plain-text authentication is allowed (off by default), and ManageSieve and CardDAV where they are turned on (off by default). Each failed save is reported in the server's error log. A database whose strict mode has been turned off stores the character as a question mark and makes the first such ban, but refuses every later ban named after the same user name, or after one holding other such characters in their place, as a duplicate while the first stands, since the server cannot look up a name holding such a character there.
📍 영향받는 시스템
hMailServer 6.2.0 ~ 6.3.3 (MySQL/MariaDB 백엔드 사용 시)
⚔️ 공격 벡터
원격 미인증 공격자가 POP3/IMAP/SMTP/ManageSieve/CardDAV의 SASL PLAIN 인증에서 BMP 외부 문자를 포함한 사용자명으로 반복 로그인 시도하여 자동 차단을 우회
🛡️ 대응 방법
hMailServer를 6.3.4 이상(벤더 패치 버전)으로 업그레이드하고, 그때까지 SASL PLAIN/평문 인증 기능을 비활성화하며, 데이터베이스 strict mode를 유지하고 utf8mb4 문자셋을 사용
🔧 검증 코드
출력된 버전이 6.2.0~6.3.3 범위에 포함되면 취약 가능성이 있으며, 'not found'가 나오면 이 시스템에 설치되어 있지 않은 것입니다. Windows에서는 설치된 프로그램 목록에서 버전을 확인하세요.
dpkg -l hmailserver 2>/dev/null | grep -E '^ii' || (command -v hmailserver >/dev/null && hmailserver --version 2>/dev/null) || echo 'hmailserver not found'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
💻 영향받는 소프트웨어
MySQL
MariaDB
Windows 10
Windows Server