🇰🇷 한글 설명
hMailServer 6.2.22-pre2~6.3.7에서 로그인 시 계정 이름을 데이터베이스가 동일하게 찾는 다른 표기(악센트 문자, 전각 문자, 무시되는 문자 등)로 입력하면, 잠금 임계값과 침해 계정 보류 검사가 이 변형 이름에 적용되지 않는다. 원격의 인증되지 않은 공격자가 계정 비밀번호를 무제한으로 추측하거나, 보류된 계정에 대해 비밀번호만 알면 로그인할 수 있다.
💡 쉬운 설명
같은 계정을 글자 모양만 조금 다르게 적어 입력하면 로그인 실패 횟수 제한을 우회할 수 있습니다. 그래서 비밀번호를 여러 번 맞춰보는 공격이 계속 가능해집니다.
🇺🇸 원문 (English)
The sign-in of Progressive Robot hMailServer 6.2.22-pre2 through 6.3.7 takes for an account names that are not its address but under which the database's own comparison finds it, while the per-name lockout and the compromised-account hold are kept by the name as the client gave it. This allows a remote unauthenticated attacker to go on guessing an account's password beyond the lockout's threshold, and anyone who has the password of an account held for review to sign in to it. The per-name lockout (from 6.2.22-pre2; AccountLockoutThreshold in hMailServer.ini, 0, off, by default) locks a name after repeated failed sign-ins. The hold (from 6.3.4, where the compromised-account detection is set to enforce, which is not the default) refuses an account judged to have been taken over. Both are asked, before the password, of the name the client gave: trimmed, in lower case and with a domain alias or the default domain applied. The account whose password the sign-in then checks is whichever one the database finds under that name. The databases find an account under spellings that this key counts apart. MySQL and MariaDB find it under one with accented letters in place of plain ones, and MariaDB 11.8, in a database made before 6.3.4, also under one with full-width letters, with a single letter in place of a pair of plain ones, or with characters its comparison ignores in any number. SQL Server and SQL Server Compact find it under one with full-width letters or with characters their comparison ignores in any number, and SQL Server also under one with a single letter in place of a pair of plain ones, with a character of Latin-1 in place of a digit and, for an address holding letters of Latin-1 outside ASCII, under those letters in the other case, and, under an accent-insensitive collation, with accented letters. PostgreSQL finds it under one holding a letter whose lower case under the database's locale is a plain letter, and, for an address holding letters outside ASCII, under those letters in the other case; on the build for musl (from 6.3.6) the server's own lower case folds nearly all of these too. On every database, a domain alias saved with white space at the end of its name gives such a spelling too, and on every database but PostgreSQL so does an account's bare local part where the default domain was saved with spaces at its end and no other white space (neither is the default). Each such spelling has a lockout threshold of its own, so the lockout limits the guesses at an account only to its threshold times the number of the account's spellings. That is far beyond any threshold for most addresses on MySQL and MariaDB, and without limit on SQL Server, on SQL Server Compact, the database the Windows installer uses by default, and before 6.3.4 on MariaDB 11.8. A locked name is got round under another spelling. A held account is signed in to under another spelling with its password over IMAP, POP3 and SMTP AUTH, and, where they are turned on (off by default), over ManageSieve, the REST API and the webmail. IMAP LOGIN, offered as installed, carries such spellings on MySQL, MariaDB and SQL Server Compact, and, on SQL Server and PostgreSQL, for some addresses; the sign-ins that carry a name as UTF-8 carry them for the others on SQL Server, and on PostgreSQL for those holding one of the plain letters another letter lowers to or a letter outside ASCII with another case. The same lookup mapped to accounts the names given by an OAuth 2.0 token, a client certificate, a Kerberos ticket and an OpenID Connect or SAML identity provider, where those are set up (none is by default), so that a name an issuer gave to one party could sign in to another's account; OAuth 2.0 tokens were mapped so from 6.2.0, before the per-name lockout existed. A name holding a NUL character, carried from 6.3.0 on Linux and 6.3.3 on Windows, failed the statement on MySQL, MariaDB and PostgreSQL.
📍 영향받는 시스템
hMailServer 6.2.22-pre2 ~ 6.3.7 (MySQL/MariaDB/SQL Server/PostgreSQL 등 백엔드 DB 사용 환경)
⚔️ 공격 벡터
원격에서 계정 이름을 악센트·전각·무시 문자 등 변형된 표기로 바꿔 로그인을 반복 시도하여 잠금 임계값을 우회하고 비밀번호를 추측
🛡️ 대응 방법
hMailServer를 6.3.8 이상(또는 패치된 최신 버전)으로 업데이트하고, 필요 시 AccountLockoutThreshold 설정과 침해 계정 탐지 기능을 활성화
🔧 검증 코드
설치된 hMailServer 버전이 6.2.22-pre2~6.3.7 범위인지 확인하고, AccountLockoutThreshold가 0(기본값, 잠금 꺼짐)이면 잠금 기능이 비활성 상태임을 의미하므로 위험도가 더 높다
dpkg -l hmailserver 2>/dev/null | grep -i hmailserver; grep -i AccountLockoutThreshold "$(find / -name hMailServer.ini 2>/dev/null | head -n1)" 2>/dev/null
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
💻 영향받는 소프트웨어
MySQL
MariaDB
PostgreSQL
SQL Server
Windows 11
Windows Server
Windows Installer