🇰🇷 한글 설명
WordPress의 Read More & Accordion 플러그인 3.5.7 이하 버전에서 'orderby' 파라미터를 통한 시간 기반 Blind SQL Injection 취약점이 발견되었습니다. 이 취약점은 SQL 쿼리의 ORDER BY 절에 사용자 입력값이 따옴표 없이 직접 결합되어 발생하며, 공격자는 이를 통해 데이터베이스의 민감한 정보를 추출할 수 있습니다.
💡 쉬운 설명
플러그인의 특정 설정값에 악의적인 명령어를 입력하여 데이터베이스가 응답하는 시간을 조절함으로써 정보를 몰래 빼낼 수 있는 결함입니다. 관리자 권한을 가진 사용자가 데이터베이스에 저장된 비밀번호 해시와 같은 중요한 정보를 훔쳐갈 수 있습니다.
🇺🇸 원문 (English)
The Read More & Accordion plugin for WordPress is vulnerable to time-based blind SQL Injection via the 'orderby' parameter in all versions up to, and including, 3.5.7. This is due to the use of esc_sql() without surrounding the value in quotes in an ORDER BY clause inside the getAllDataByLimit() and getAccordionAllDataByLimit() functions in ReadMoreData.php. The user-supplied $_GET['orderby'] value is only processed through esc_attr() (an HTML-escaping function) before being passed to these database functions, where esc_sql() is applied but the value is directly concatenated—unquoted—into the ORDER BY fragment of the SQL query before $wpdb->prepare() is called. Because esc_sql() only escapes quote characters and backslashes (which are irrelevant in an unquoted ORDER BY context), an attacker can inject arbitrary SQL expressions such as (SELECT SLEEP(5)) or conditional subqueries to perform time-based blind data extraction. This makes it possible for authenticated attackers with administrator-level access or above (or any role explicitly permitted access to the plugin's admin pages via the yrm-user-roles setting) to extract sensitive data from the database, including administrator credential hashes.
📍 영향받는 시스템
Read More & Accordion plugin for WordPress (version 3.5.7 and below)
⚔️ 공격 벡터
인증된 공격자가 'orderby' 파라미터에 SQL 함수(예: SLEEP)를 주입하여 시간 지연을 유도하는 방식
🛡️ 대응 방법
플러그인을 최신 버전으로 업데이트하거나, SQL 쿼리 작성 시 입력값을 따옴표로 감싸고 적절한 검증 과정을 거치도록 코드를 수정해야 합니다.
🔧 검증 코드
출력된 결과에서 해당 플러그인의 버전이 3.5.7 이하인지 확인합니다.
wp-cli plugin list --allow-root | grep -E 'read-more-accordion'