🇰🇷 한글 설명
Stalwart Mail Server의 기본 설정에서 OAuth 리다이렉트 대상에 대한 검증이 누락되어 발생하는 취약점입니다. 공격자가 제어하는 주소로 리다이렉트 값을 조작하면, 사용자가 인증을 완료했을 때 유효한 인증 코드가 공격자의 서버로 전송되어 계정 권한을 탈취당할 수 있습니다.
💡 쉬운 설명
로그인 과정에서 인증 완료 후 이동할 주소를 확인하지 않아 발생하는 보안 허점입니다. 해커가 만든 가짜 주소로 인증 정보가 전달되어 이메일 계정을 통째로 빼앗길 수 있습니다.
🇺🇸 원문 (English)
Stalwart Mail Server does not compare an OAuth redirect target against any registered destination in its default configuration. The validation routine in crates/http/src/auth/oauth/registration.rs returns success immediately when the client-authentication requirement is disabled, and that requirement is false in the shipped settings, so the supplied redirect value is neither matched against a registered client nor otherwise constrained. The value is stored with the authorization code, and the login page reads it back and sends the browser to it with the code attached. A request naming a destination the attacker controls therefore delivers a valid authorization code there once the account holder authenticates, and because the token endpoint checks only that the redirect presented at exchange matches the one recorded with the code, the same party can exchange it for access and refresh tokens and read the account's mail.
📍 영향받는 시스템
Stalwart Mail Server (기본 설정 사용 시)
⚔️ 공격 벡터
조작된 OAuth 리다이렉트 URI를 이용한 인증 코드 탈취
🛡️ 대응 방법
OAuth 리다이렉트 대상에 대한 엄격한 화이트리스트 검증 로직을 적용하거나 클라이언트 인증 요구 사항을 활성화해야 합니다.
🔧 검증 코드
해당 소스 코드 파일 내에 리다이렉트 대상 검증 로직이 누락되었는지 확인합니다.
grep -r "auth/oauth/registration.rs" /path/to/stalwart/src/ || echo "Source code not found"
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
💻 영향받는 소프트웨어
Microsoft Exchange Server