🇰🇷 한글 설명
WP Visitor Statistics (Real Time Traffic) 플러그인 8.8 이하 버전에는 [wsm_showTrafficStatsList] 숏코드의 'from', 'to', 'first', 'second' 속성 처리 과정에서 입력값 이스케이프가 부족해 SQL 인젝션이 발생합니다. 기여자(Contributor) 이상 권한을 가진 인증된 공격자가 기존 SQL 쿼리에 추가 쿼리를 붙여 데이터베이스의 민감한 정보를 추출할 수 있습니다.
💡 쉬운 설명
글을 작성할 수 있는 권한만 있는 사용자가 특정 숏코드에 조작된 값을 넣으면 사이트 데이터베이스의 내용을 몰래 꺼낼 수 있습니다. 관리자 계정 정보나 회원 정보 같은 중요한 데이터가 노출될 위험이 있습니다.
🇺🇸 원문 (English)
The WP Visitor Statistics (Real Time Traffic) plugin for WordPress is vulnerable to SQL Injection via the 'from' (and sibling 'to'/'first'/'second') shortcode attribute of the [wsm_showTrafficStatsList] shortcode in versions up to, and including, 8.8 This is due to insufficient escaping on the user-supplied attribute and lack of sufficient preparation on the existing SQL query: `shortcode_atts()` returns attacker-supplied shortcode attributes verbatim (WP core performs no sanitization), only `$atts['id']` is re-sanitized afterward, and the raw value is then concatenated into a double-quoted SQL string literal inside `fnGetHourlyReportByDateNameTimeZone()` (`includes/wsm_db.php:1449`) and executed via `$wpdb->get_results()`. This makes it possible for authenticated attackers, with Contributor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
📍 영향받는 시스템
WordPress용 WP Visitor Statistics (Real Time Traffic) 플러그인 8.8 이하 버전
⚔️ 공격 벡터
기여자 이상 권한의 인증된 사용자가 [wsm_showTrafficStatsList] 숏코드의 from/to/first/second 속성에 SQL 구문을 삽입해 실행
🛡️ 대응 방법
플러그인을 8.8보다 높은 패치 버전으로 업데이트하거나, 패치 전까지 플러그인을 비활성화하고 기여자 계정 권한을 점검
🔧 검증 코드
출력된 버전이 8.8 이하이면 취약하므로 즉시 업데이트가 필요하며, 상태가 active이면 공격 노출 상태입니다. 버전 정보가 나오지 않으면 플러그인 디렉터리 경로를 직접 확인해야 합니다.
wp plugin list --name=wp-visitor-statistics --fields=name,version,status 2>/dev/null || grep -i 'Version' wp-content/plugins/wp-visitor-statistics*/wp-visitor-statistics*.php 2>/dev/null | head -n 5