[CVE-2024-11104] 취약점 분석 보고서
CVE-2024-11104 WordPress Sky Addons for Elementor 플러그인에서 발생하는 save_options() 함수 취약점
CVE-2024-11104
영향받는 버전: Sky Addons for Elementor <= 2.6.2
패치된 버전: 2.6.3
심각도: 높음
개요
CVE-2024-11104는 Sky Addons for Elementor 워드프레스 플러그인에서 발견된 취약점으로, 낮은 권한을 가진 사용자(예: 구독자)가 save_options
함수에 접근하여 민감한 플러그인 옵션을 수정할 수 있는 취약점입니다.
이 취약점은 권한 확인이 누락되어 API 데이터 오용, 옵션 비활성화, 또는 플러그인 기능 조작 등 심각한 영향을 미칠 수 있습니다.
취약점 세부 내용
- 권한 확인 누락
save_options
함수 내에서current_user_can()
을 통한 관리자 권한 확인이 이루어지지 않았습니다.
- Nonce 검증 취약성
- Nonce 검증은 구현되어 있었지만, 낮은 권한 사용자가 유효한 Nonce를 생성할 수 있어 CSRF 방지에 효과적이지 못했습니다.
Diff 분석
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
public function save_options() {
+ if ( ! current_user_can( 'manage_options' ) ) {
+ return;
+ }
$post_value = $this->option_data_check( $_POST );
$action = $this->action();
$nonce = $this->verify_nonce( $post_value );
if ( wp_verify_nonce( $nonce, $action ) ) {
$option_name = $post_value['option_page'];
$post_value['na'] = 'activated-all';
unset( $post_value['_wpnonce'] );
unset( $post_value['action'] );
unset( $post_value['_wp_http_referer'] );
unset( $post_value['option_page'] );
if ( $option_name == self::API_DB_KEY || count( $post_value ) > 1 ) {
unset( $post_value['na'] );
}
$filter_value = $post_value;
if ( $option_name !== self::API_DB_KEY ) {
$filter_value = array_keys( $post_value );
}
$savedOption = get_option( $option_name, [] );
$response = new \stdClass();
if ( $savedOption === $post_value || update_option( $option_name, $filter_value ) || add_option( $option_name, $filter_value ) ) {
$response->status = true;
$response->msg = esc_html__( 'Successfully Updated.', 'sky-elementor-addons' );
$response->msg_details = esc_html__( 'Great, your settings saved successfully in your system.', 'sky-elementor-addons' );
} else {
$response->status = false;
$response->msg = esc_html__( 'Already Updated.', 'sky-elementor-addons' );
$response->msg_details = esc_html__( 'There is no change in your settings. So there is no need to save the settings again.', 'sky-elementor-addons' );
}
wp_send_json( $response );
}
}
트리거
취약한 save_options
함수는 다음과 같은 액션 훅을 통해 호출됩니다.
1
2
3
4
5
private function __construct() {
$this->dispatch_actions();
add_action( 'admin_menu', [ $this, 'admin_menu' ] );
add_action( 'wp_ajax_sky_save_option_data', [ $this, 'save_options' ] );
}
POC
공격자는 다음과 같은 단계를 통해 해당 취약점을 악용할 수 있습니다:
1. 유효한 낮은 권한 사용자 계정 생성
워드프레스 대시보드나 CLI를 사용하여 구독자 권한 사용자를 생성합니다.
2. 구독자 권한 사용자로 로그인
3. 조작된 POST 요청 전송
구독자의 세션으로 admin-ajax.php
경로에 save_options
를 트리거합니다.
4. 응답 확인
민감한 옵션들을 조작할 수 있습니다.
위 단계를 통해 권한이 낮은 사용자가 임의의 옵션을 업데이트 하거나 api data를 조작할 수 있게 됩니다.
[변경 전]
[변경 후]
This post is licensed under CC BY 4.0 by the author.