🇰🇷 한글 설명
YOURLS 1.5.1부터 1.10.4 버전 사이에서 발생하는 취약점으로, HTTP Referer 헤더를 처리하는 과정에서 적절한 이스케이프 처리가 누락되어 발생합니다. 공격자가 조작된 Referer 값을 통해 통계 페이지의 차트 생성 스크립트에 악성 자바스크립트를 삽입할 수 있으며, 관리자가 통계 페이지를 열람할 때 권한 탈취 및 데이터 유출이 발생할 수 있습니다.
💡 쉬운 설명
URL 단축 서비스의 통계 화면을 볼 때, 공격자가 몰래 심어놓은 악성 코드가 관리자의 브라우저에서 실행될 수 있는 보안 약점입니다. 이를 통해 관리자의 계정 정보나 중요한 데이터가 해커에게 넘어갈 위험이 있습니다.
🇺🇸 원문 (English)
YOURLS is a self-hosted, customizable URL shortener written in PHP. From 1.5.1 until 1.10.4, YOURLS stores the HTTP Referer header through yourls_get_referrer(), yourls_sanitize_url_safe(), and yourls_log_redirect(), then aggregates the value in yourls-infos.php and passes the derived domain through yourls_get_domain(), yourls_stats_pie(), and yourls_google_array_to_data_table(). The chart builder concatenates labels into inline JavaScript without JavaScript-string escaping, so an unauthenticated attacker can poison the statistics of an existing short URL with a crafted referrer. When an administrator or public stats-page viewer opens the affected statistics page, attacker-controlled JavaScript executes in the YOURLS origin and can access admin-visible data, the API signature token, and privileged same-origin actions. This issue is fixed in version 1.10.4.
📍 영향받는 시스템
YOURLS version 1.5.1 ~ 1.10.4
⚔️ 공격 벡터
조작된 HTTP Referer 헤더를 이용한 통계 데이터 오염 및 XSS(Cross-Site Scripting) 공격
🛡️ 대응 방법
YOURLS를 최신 버전인 1.10.4 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 1.10.4 미만이면 취약한 상태이며, 1.10.4 이상이면 안전합니다.
php -r 'include "yourls/yourls-loader.php"; echo YOURLS_VERSION;" 2>/dev/null || echo "Not installed"'