🇰🇷 한글 설명
mailcow의 Sync Job 기능에서 쉘 명령 주입(Shell Command Injection) 취약점이 발견되었습니다. 공격자는 검증되지 않은 비밀번호 필드를 악용하여 dovecot 컨테이너에 대한 쉘 권한을 획득할 수 있습니다. 이 문제는 2023-03 업데이트를 통해 해결되었습니다.
💡 쉬운 설명
이메일 관리 프로그램의 특정 기능에서 비밀번호 입력란에 악성 명령어를 섞어 넣으면 시스템을 해킹할 수 있는 문제입니다. 해커가 이 취약점을 이용하면 이메일 서버의 제어권을 탈취할 수 있습니다.
🇺🇸 원문 (English)
mailcow is a dockerized email package, with multiple containers linked in one bridged network. The Sync Job feature - which can be made available to standard users by assigning them the necessary permission - suffers from a shell command injection. A malicious user can abuse this vulnerability to obtain shell access to the Docker container running dovecot. The imapsync Perl script implements all the necessary functionality for this feature, including the XOAUTH2 authentication mechanism. This code path creates a shell command to call openssl. However, since different parts of the specified user password are included without any validation, one can simply execute additional shell commands. Notably, the default ACL for a newly-created mailcow account does not include the necessary permission. The Issue has been fixed within the 2023-03 Update (March 3rd 2023). As a temporary workaround the Syncjob ACL can be removed from all mailbox users, preventing from creating or changing existing Syncjobs.
📍 영향받는 시스템
mailcow (2023-03 업데이트 이전 버전)
⚔️ 공격 벡터
Sync Job 설정 시 비밀번호 필드에 특수 문자를 포함한 쉘 명령어를 주입하여 실행
🛡️ 대응 방법
mailcow를 2023-03 업데이트 버전 이상으로 업데이트하거나, 모든 사용자의 Syncjob ACL 권한을 제거합니다.
🔧 검증 코드
공식 문서나 업데이트 로그에서 2023년 3월 패치 내역이 포함되어 있는지 확인합니다.
curl -s https://docs.mailcow.email/ | grep -i '2023-03'