🇰🇷 한글 설명
djust 1.0.7 미만 버전의 내장 컴포넌트 템플릿 태그에서 사용자 공급 URL의 스킴을 검증하지 않아 발생하는 취약점입니다. HTML 이스케이프 처리가 되어 있더라도 'javascript:' 프로토콜을 차단하지 못해 XSS 공격이 가능합니다.
💡 쉬운 설명
웹사이트의 링크 주소에 악성 코드를 심어 사용자가 클릭했을 때 개인정보를 훔치는 공격이 가능합니다. 링크 주소가 안전한지 확인하는 절차가 누락되어 발생한 문제입니다.
🇺🇸 원문 (English)
djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to version 1.0.7, many djust built-in component template tags (`djust.components.templatetags.*`) render a developer/user-supplied URL into an `href` / `action` attribute, HTML-escaping it with `conditional_escape` but never validating the URL scheme. HTML escaping prevents attribute breakout but does not neutralize a `javascript:` URI (which needs no escapable characters), so a URL value of `javascript:alert(document.cookie)` lands verbatim in `<a href="javascript:alert(document.cookie)">` and executes in the victim's session on click. Version 1.0.7 contains a fix. As a workaround, do not pass user-controllable URLs to the affected built-in component tags; pre-validate URL schemes in application code before binding them to component arguments.
📍 영향받는 시스템
djust versions prior to 1.0.7
⚔️ 공격 벡터
사용자가 제어 가능한 URL을 'javascript:' 스킴을 포함하여 컴포넌트 태그의 href 또는 action 속성에 전달
🛡️ 대응 방법
djust를 1.0.7 버전 이상으로 업데이트하거나, 사용자 입력 URL을 컴포넌트에 전달하기 전에 URL 스킴을 사전에 검증하십시오.
🔧 검증 코드
출력된 Version이 1.0.7 미만이면 취약한 상태입니다.
pip show djust 2>/dev/null | grep -E 'Version'