🇰🇷 한글 설명
WordPress용 WP Optimizer 플러그인 2.5.0 이하 버전에서 's' 파라미터를 통한 SQL 인젝션 취약점이 발견되었습니다. Query::parse_key_compare_field() 메서드의 안전하지 않은 서브쿼리 탐지 로직으로 인해, 특정 패턴의 입력값이 이스케이프 처리 없이 SQL 쿼리에 직접 삽입될 수 있습니다. 이를 통해 인증된 관리자 권한의 공격자가 데이터베이스에서 민감한 정보를 추출할 수 있습니다.
💡 쉬운 설명
플러그인의 특정 기능이 사용자가 입력한 명령어를 제대로 검사하지 않고 데이터베이스에 그대로 전달하는 결함이 있습니다. 이를 악용하면 해커가 데이터베이스에 몰래 명령을 내려 중요한 정보를 훔쳐갈 수 있습니다.
🇺🇸 원문 (English)
The WP Optimizer plugin for WordPress is vulnerable to SQL Injection via the 's' parameter in all versions up to and including 2.5.0. This is due to an unsafe subquery-detection branch in the Query::parse_key_compare_field() method that, when the user-supplied value matches the regex ^[(\s]*SELECT\s+, wraps the value in parentheses and embeds it directly into the SQL string without any escaping or quoting. While the normal LIKE code path correctly uses esc_sql($wpdb->esc_like(...)) and wraps the value in single quotes, this branch completely bypasses those protections. Because the attack payload (SELECT ...) contains no single quotes, WordPress's wp_magic_quotes() provides no protection. This makes it possible for authenticated attackers with administrator-level access to inject arbitrary SQL subqueries — including time-based blind payloads — that can be used to extract sensitive information from the database.
📍 영향받는 시스템
WP Optimizer plugin for WordPress (version 2.5.0 and below)
⚔️ 공격 벡터
인증된 관리자 권한을 가진 공격자가 's' 파라미터에 특수하게 조작된 SQL 서브쿼리(SELECT ...)를 입력하여 공격
🛡️ 대응 방법
WP Optimizer 플러그인을 최신 버전으로 업데이트하거나, 해당 취약점이 해결된 패치를 적용하십시오.
🔧 검증 코드
출력된 결과에서 wp-optimizer의 버전이 2.5.0 이하인지 확인하십시오.
wp plugin list --all | grep -E 'wp-optimizer'