🇰🇷 한글 설명
WordPress용 Wholesale for WooCommerce 플러그인 2.0.5 이하 버전에서 권한 상승 취약점이 발견되었습니다. `save_requests_meta()` 함수가 사용자 역할 설정 시 적절한 권한 확인이나 허용 목록 검증을 수행하지 않아, 인증된 공격자가 관리자 권한을 획득할 수 있습니다.
💡 쉬운 설명
플러그인의 보안 허점으로 인해 일반 사용자나 작성자 권한을 가진 사람이 스스로를 관리자(최고 권한자)로 변경할 수 있는 문제입니다. 공격자가 조작된 요청을 보내면 사이트의 모든 제어권을 탈취할 수 있습니다.
🇺🇸 원문 (English)
The Wholesale for WooCommerce plugin for WordPress is vulnerable to Privilege Escalation in all versions up to, and including, 2.0.5. This is due to the `save_requests_meta()` function applying only `sanitize_text_field()` to the `user_role_set` POST parameter before passing it directly to `WP_User::add_role()`, with no allowlist validation against permitted wholesale roles and no capability check such as `current_user_can('promote_users')` or `current_user_can('manage_options')`. This makes it possible for authenticated attackers with author-level access and above to escalate their privileges to administrator by supplying `administrator` as the `user_role_set` value in a crafted request. The function is gated only by a nonce (`request_user_role_nonce`) that is rendered in the meta box on the `wwp_requests` post edit screen; because the post type is registered with `capability_type => 'post'`, any author-level user who has authored a `wwp_requests` post — such as one created via the wholesale registration form — can access this nonce and submit the role-assignment request.
📍 영향받는 시스템
Wholesale for WooCommerce plugin (버전 2.0.5 및 그 이하 모든 버전)
⚔️ 공격 벡터
인증된 공격자가 `user_role_set` 파라미터에 `administrator` 값을 담아 조작된 POST 요청을 전송
🛡️ 대응 방법
플러그인을 최신 버전으로 업데이트하거나, 권한 검증 로직이 포함된 보안 패치를 적용하십시오.
🔧 검증 코드
출력된 플러그인 버전이 2.0.5 이하인지 확인하여 취약 여부를 판단합니다.
wp plugin list --allow-root | grep -E 'wholesale-for-woocommerce'