🇰🇷 한글 설명
Litestar 프레임워크에서 템플릿 엔진과 CSRF 보호 기능을 함께 사용할 때 HTML 인젝션 취약점이 발생합니다. CSRF 쿠키 내용이 템플릿 엔진의 자동 이스케이프 대상에서 제외되어, 공격자가 이를 악용해 XSS(교차 사이트 스크립팅)로 공격을 확대할 수 있습니다.
💡 쉬운 설명
웹사이트의 보안 기능을 사용하는 과정에서 보안 검사를 거치지 않는 데이터가 웹 페이지에 그대로 노출되는 문제입니다. 이를 통해 해커가 사용자의 브라우저에서 악성 코드를 실행할 수 있습니다.
🇺🇸 원문 (English)
Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to version 2.20.0, Litestar instances which use a template engine in conjunction with CSRF protection are vulnerable to HTML Injection which can be escalated to Cross Site Scripting due to the contents of the CSRF cookie being excluded from automatic escaping by the template engine when configured inline with documentation recommendations. This issue has been patched in version 2.20.0.
📍 영향받는 시스템
Litestar version < 2.20.0
⚔️ 공격 벡터
CSRF 쿠키에 조작된 HTML/스크립트 내용을 삽입하여 템플릿 엔진을 통해 실행
🛡️ 대응 방법
Litestar를 2.20.0 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 2.20.0 미만이면 취약한 상태입니다.
pip show litestar | grep Version
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
💻 영향받는 소프트웨어
Spring Cloud Gateway Server