WPElemento Importer <= 0.6.4 - Missing Authorization
Description
The WPElemento Importer plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in all versions up to, and including, 0.6.4. This makes it possible for authenticated attackers, with Subscriber-level access and above, to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=0.6.4What Changed in the Fix
Changes introduced in v0.6.5
Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-24996 (WPElemento Importer) ## 1. Vulnerability Summary The **WPElemento Importer** plugin (up to 0.6.4) is vulnerable to **Missing Authorization** in its AJAX handlers. The plugin registers several AJAX actions via the `WPElemento_Importer_ThemeWhizzie` class…
Show full research plan
Exploitation Research Plan: CVE-2026-24996 (WPElemento Importer)
1. Vulnerability Summary
The WPElemento Importer plugin (up to 0.6.4) is vulnerable to Missing Authorization in its AJAX handlers. The plugin registers several AJAX actions via the WPElemento_Importer_ThemeWhizzie class in theme-wizard/elemento_exporter_whizzie.php. These actions (registered with wp_ajax_*) are accessible to any authenticated user, including those with Subscriber privileges. Because the handler functions lack internal capability checks (e.g., current_user_can('manage_options')), a Subscriber can perform administrative tasks such as installing/activating themes or modifying plugin license configurations.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Vulnerable Actions:
wz_activate_elemento_exporter_pro(Likely used to manipulate license/validation status).wpelemento_importer_install_free_theme(Used to install and activate WordPress themes).setup_plugins(Used to trigger plugin installations via TGMPA).
- Authentication: Authenticated, Subscriber-level access or higher.
- Payload Parameters:
action: The AJAX action name.theme_slug: (For installation) The slug of the theme to install (e.g.,twentytwentyfour).keyorlicense_key: (For license activation) The key to set._ajax_nonce: The security nonce localized by the plugin.
3. Code Flow
- Initialization:
plugin.phprequirestheme-wizard/config.php(Line 46), which instantiatesWPElemento_Importer_ThemeWhizzie. - Registration: Inside
WPElemento_Importer_ThemeWhizzie::init()(Lines 140-155), AJAX actions are registered:add_action('wp_ajax_wpelemento_importer_install_free_theme', array($this, 'wpelemento_importer_install_and_activate_free_theme')); add_action('wp_ajax_wz_activate_elemento_exporter_pro', array($this, 'wz_activate_elemento_exporter_pro')); - Execution: When a Subscriber sends a POST request to
admin-ajax.phpwithaction=wpelemento_importer_install_free_theme, WordPress executes the callbackwpelemento_importer_install_and_activate_free_theme. - Sink: The handler likely performs a theme installation using the
Theme_Upgraderclass or modifies options likewpelemento_importer_pro_theme_validation_statusvia static methods (Lines 72-92) without verifying if the user hasmanage_optionscapabilities.
4. Nonce Acquisition Strategy
The plugin registers and localizes scripts in enqueue_scripts (Line 166). The nonce is required for the AJAX request.
- Check Script Loading: The script
theme-wizard-scriptis registered at Line 189. It is enqueued viaadmin_enqueue_scripts(Line 116). - Identify JS Variable: Based on the code, the localization variable is likely named
wpelemento_importer_setup_wizard_paramsorwpelementoimporter_wizard_params(derived from$this->plugin_nameat Line 132). - Extraction:
- Log in as a Subscriber.
- Navigate to
/wp-admin/profile.php. - Use
browser_evalto find the nonce:browser_eval("window.wpelementoimporter_wizard_params?.wpnonce || window.wpelemento_importer_params?.nonce")
- Action Matching: Note that
wp_ajax_handlers often use the same nonce localized for the wizard. If a nonce check is present, it will likely use the key found in this global object.
5. Exploitation Strategy
We will demonstrate the vulnerability by unauthorizedly activating a theme from WordPress.org.
Step 1: Extract Nonce
- Log in to WordPress as a Subscriber.
- Visit
/wp-admin/. - Extract the nonce from the localized script data.
- Variable Name:
wpelemento_importer_wizard_params(inferred from$this->plugin_nameat Line 132). - Key:
wpnonceornonce.
- Variable Name:
Step 2: Unauthorized Theme Installation
Submit an AJAX request to install a theme (e.g., twentytwentyfour).
- Method: POST
- URL:
http://<target>/wp-admin/admin-ajax.php - Content-Type:
application/x-www-form-urlencoded - Body:
action=wpelemento_importer_install_free_theme&theme_slug=twentytwentyfour&_ajax_nonce=[NONCE]
Step 3: Unauthorized License Activation (Alternative)
Attempt to change the validation status to "true".
- Method: POST
- URL:
http://<target>/wp-admin/admin-ajax.php - Body:
action=wz_activate_elemento_exporter_pro&key=VALID_KEY_MOCK&_ajax_nonce=[NONCE]
6. Test Data Setup
- A WordPress environment with WPElemento Importer 0.6.4 installed.
- A Subscriber user (e.g.,
attacker/password). - Ensure the theme
twentytwentyfouris not currently installed.
7. Expected Results
- Response: The AJAX request should return a success message (e.g., JSON
{ "success": true }or a success string). - Effect: The theme
twentytwentyfourwill be downloaded and installed in/wp-content/themes/. - Alternative Effect: The option
wpelemento_importer_pro_theme_validation_statuswill be updated totrue.
8. Verification Steps
After the HTTP request, verify the impact via WP-CLI:
- Check Theme Installation:
wp theme is-installed twentytwentyfour - Check Pro Validation Status:
(Expected:wp option get wpelemento_importer_pro_theme_validation_statustrue) - Check Theme Key:
wp option get wp_pro_theme_key
9. Alternative Approaches
If wpelemento_importer_install_free_theme requires specific theme metadata:
- Try the
wpelemento_importer_setup_elementoraction (Line 151) which might trigger Elementor-specific configurations or installations. - If the nonce check fails or is missing, try the request without the
_ajax_nonceparameter to see if the plugin fails to enforce CSRF protection as well. - Check
admin_initforwpelemento_importer_handle_free_theme_redirect(Line 141); if this function handles$_GETparameters without authorization, it might be possible to trigger a redirect or option update via a simple GET request.
Summary
The WPElemento Importer plugin for WordPress is vulnerable to unauthorized access because several AJAX handlers in the WPElemento_Importer_ThemeWhizzie class lack capability checks. This allows authenticated attackers with Subscriber-level access or higher to perform administrative actions such as installing and activating themes, configuring plugins, or manipulating license validation status.
Vulnerable Code
// theme-wizard/elemento_exporter_whizzie.php lines 147-154 add_action('wp_ajax_setup_plugins', array($this, 'setup_plugins')); add_action('wp_ajax_setup_widgets', array($this, 'setup_widgets')); add_action('wp_ajax_wpelemento_importer_setup_themes', array($this, 'wpelemento_importer_setup_themes')); add_action('wp_ajax_wz_activate_elemento_exporter_pro', array($this, 'wz_activate_elemento_exporter_pro')); add_action('wp_ajax_wpelemento_importer_setup_elementor', array($this, 'wpelemento_importer_setup_elementor')); add_action('wp_ajax_templates_api_category_wise', array($this, 'wpelemento_importer_pro_templates_api_category_wise')); add_action('wp_ajax_wpelemento_importer_install_free_theme', array($this, 'wpelemento_importer_install_and_activate_free_theme')); --- // theme-wizard/elemento_exporter_whizzie.php lines 1338+ function wpelemento_importer_setup_elementor() { $elemento_themes = $this->get_elemento_themes();
Security Fix
@@ -1336,6 +1336,14 @@ } // this code is for demo elementor importer start // function wpelemento_importer_setup_elementor() { + + if (!check_ajax_referer('whizzie_nonce', 'wpnonce', false)) { + wp_send_json_error(array('message' => esc_html__('Nonce verification failed', 'wpelemento-importer'))); + } + + if (!current_user_can('manage_options')) { + wp_send_json_error(array('message' => esc_html__('Insufficient permissions. Administrator access required.', 'wpelemento-importer'))); + } $elemento_themes = $this->get_elemento_themes();
Exploit Outline
To exploit this vulnerability, an attacker first authenticates as a Subscriber and extracts a valid AJAX nonce from the WordPress admin dashboard, typically found in the localized JavaScript object 'wpelemento_importer_wizard_params'. The attacker then sends a POST request to '/wp-admin/admin-ajax.php' with the 'action' parameter set to one of the vulnerable functions, such as 'wpelemento_importer_install_free_theme'. By providing the desired 'theme_slug' and the extracted nonce, the attacker can force the site to install and activate an arbitrary theme from the WordPress repository, bypassing the requirement for administrative privileges because the server fails to verify the user's capabilities before execution.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.