
Exploit for CVE-2022-1329 in WordPress Elementor 3.6.0-3.6.2 enabling authenticated remote code execution via malicious ZIP upload with PHP payload.
Ngày: 16 tháng 4 năm 2023
Khai thác Tác giả: Việt Hùng (https://github.com/phanthibichtram12)
Trang chủ của nhà cung cấp: https://elementor.com/
Link phần mềm: https://wordpress.org/plugins/elementor/advanced/ (kéo xuống chọn phiên bản)
Phiên bản: 3.6.0, 3.6.1, 3.62
Đã thử nghiệm trên: WordPress 5.9.3 (không phụ thuộc vào hệ điều hành vì cách khai thác này KHÔNG cung cấp tải trọng)
CVE : CVE-2022-1329
The WordPress plugin Elementor (v. 3.6.0, 3.6.1, 3.6.2) has a vulnerability that allows any authenticated user to upload and execute any PHP file.
This vulnerability, in OWASP TOP 10 2021, is ranked at #1 (Broken Access Control)
The file containing this vulnerability is elementor/core/app/modules/onboarding/module.php
At the end of this file, you can find this code:
add_action( 'admin_init', function() {
nếu ( wp_doing_ajax() &&
isset( $_POST['action'] ) &&
isset( $_POST['_nonce'] ) &&
wp_verify_nonce( $_POST['_nonce'], Ajax::NONCE_KEY )
) {
$this->maybe_handle_ajax();
}
} );
This code is triggered whenever ANY user account accesses /wp-admin For it to work, we need the following 4 things:
The file we upload must have the following structure:
This file will be YOUR payload (e.g., PHP Reverse Shell or anything else) WARNING: The fake plugin we upload will be activated by Elementor, which means every time we access any page, we will trigger our payload. For example, if it tries to connect to an offline server, that could lead to Denial of Service. To prevent this, I recommend using a variable to activate the payload. Something like this (access Anypage.php?activate=1 to proceed with the actual payload):
if (!isset($_GET['activate']))
return;