🇰🇷 한글 설명
Litestar 2.22.0 미만 버전에서 Host 헤더를 생략하고 X-Forwarded-Host 헤더에 허용된 도메인을 입력하여 AllowedHostsMiddleware의 검증을 우회할 수 있는 취약점이 발견되었습니다. 이로 인해 비밀번호 재설정 오염, 캐시 오염 및 서버 측 요청 라우팅 조작과 같은 호스트 헤더 주입 공격이 가능합니다. 리버스 프록시가 X-Forwarded-Host 헤더를 제거하지 않거나 HTTP/1.0 연결을 허용하는 경우 위험에 노출됩니다.
💡 쉬운 설명
웹사이트가 접속자를 확인하는 과정에서 가짜 주소 정보를 담은 헤더를 진짜로 착각하여 보안 검사를 통과시키는 문제입니다. 공격자가 이 점을 이용해 사이트의 중요한 기능을 악용하거나 잘못된 정보를 저장하게 만들 수 있습니다.
🇺🇸 원문 (English)
Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. In versions prior to 2.22.0, an attacker can bypass the allowed hosts validation by omitting the Host header and supplying an X-Forwarded-Host header set to a whitelisted domain. The AllowedHostsMiddleware trusts the X-Forwarded-Host header as a fallback when the Host header is absent. Since X-Forwarded-Host is a client-controllable header, this enables host header injection attacks such as password reset poisoning, cache poisoning, and server-side request routing manipulation. Any application using AllowedHostsConfig is affected when deployed without a reverse proxy that strips X-Forwarded-Host, or when accepting HTTP/1.0 connections. This issue has been fixed in version 2.22.0.
📍 영향받는 시스템
Litestar versions prior to 2.22.0
⚔️ 공격 벡터
Host 헤더를 누락시키고 조작된 X-Forwarded-Host 헤더를 전송하여 검증 로직 우회
🛡️ 대응 방법
Litestar를 2.22.0 버전 이상으로 업데이트하거나, 리버스 프록시에서 X-Forwarded-Host 헤더를 제거하도록 설정
🔧 검증 코드
출력된 버전이 2.22.0 미만이면 취약한 상태입니다.
pip show litestar | grep Version
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server