🇰🇷 한글 설명
Tandoor Recipes 2.5.3 이하 버전에서 발생하는 취약점으로, ALLOWED_HOSTS 설정이 '*'로 되어 있어 HTTP Host 헤더 검증이 이루어지지 않습니다. 공격자가 조작된 Host 헤더를 사용하여 서버가 생성하는 모든 절대 URL을 조작할 수 있으며, 특히 초대 링크를 공격자의 서버로 유도하여 토큰을 탈취할 수 있습니다.
💡 쉬운 설명
웹사이트가 주소를 생성할 때 사용자가 보낸 가짜 주소를 그대로 믿어버리는 문제입니다. 이를 통해 초대 메일의 링크를 가짜 사이트로 바꿔서 사용자의 중요한 정보를 훔칠 수 있습니다.
🇺🇸 원문 (English)
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Versions up to and including 2.5.3 set ALLOWED_HOSTS = '*' by default, which causes Django to accept any value in the HTTP Host header without validation. The application uses request.build_absolute_uri() to generate absolute URLs in multiple contexts, including invite link emails, API pagination, and OpenAPI schema generation. An attacker who can send requests to the application with a crafted Host header can manipulate all server-generated absolute URLs. The most critical impact is invite link poisoning: when an admin creates an invite and the application sends the invite email, the link points to the attacker's server instead of the real application. When the victim clicks the link, the invite token is sent to the attacker, who can then use it at the real application. As of time of publication, it is unknown if a patched version is available.
📍 영향받는 시스템
Tandoor Recipes 2.5.3 및 그 이하 모든 버전
⚔️ 공격 벡터
조작된 HTTP Host 헤더를 포함한 요청을 전송하여 서버가 생성하는 URL을 변조함
🛡️ 대응 방법
settings.py 파일의 ALLOWED_HOSTS 설정을 '*' 대신 실제 서비스 도메인으로 명시적으로 제한함
🔧 검증 코드
출력 결과가 ['*'] 이거나 '*'를 포함하고 있다면 취약한 상태입니다.
python manage.py shell -c "from django.conf import settings; print(settings.ALLOWED_HOSTS)"
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server