Element Invader – Template Kits for Elementor <= 1.2.4 - Missing Authorization
Description
The Element Invader – Template Kits for Elementor plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in all versions up to, and including, 1.2.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
<=1.2.4Source Code
WordPress.org SVNPatched version not available.
This research plan outlines the steps to investigate and exploit **CVE-2026-24386**, a missing authorization vulnerability in the **Element Invader – Template Kits for Elementor** plugin. --- ### 1. Vulnerability Summary The **Element Invader** plugin (versions <= 1.2.4) fails to implement proper …
Show full research plan
This research plan outlines the steps to investigate and exploit CVE-2026-24386, a missing authorization vulnerability in the Element Invader – Template Kits for Elementor plugin.
1. Vulnerability Summary
The Element Invader plugin (versions <= 1.2.4) fails to implement proper capability checks on at least one AJAX handler registered via wp_ajax_. This allows any authenticated user with Subscriber-level privileges to trigger administrative functions. The vulnerability typically resides in functions responsible for importing templates, installing kit data, or modifying plugin settings.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Vulnerable Action:
elementinvader_install_kitorelementinvader_import_template(inferred; agent must verify via grep). - Authentication: Authenticated (Subscriber+).
- Parameter:
action,nonce, and functionality-specific parameters (e.g.,kit_id,template_id). - Impact: Unauthorized modification of site content, potential overwrite of Elementor layouts, or denial of service by triggering large imports.
3. Code Flow Trace
- The plugin registers an AJAX handler in its constructor or an
inithook:add_action( 'wp_ajax_elementinvader_install_kit', [ $this, 'install_kit' ] ); - The
install_kitfunction (or similar) is called when a POST request is sent toadmin-ajax.phpwithaction=elementinvader_install_kit. - The function likely performs a nonce check using
check_ajax_referer()orwp_verify_nonce(). - Crucially, the function fails to call
current_user_can( 'manage_options' )before proceeding with the privileged logic. - The logic then executes (e.g., fetching a remote JSON kit and inserting it into the database).
4. Nonce Acquisition Strategy
Since this is an authenticated (Subscriber) vulnerability, we need a nonce. Even if a Subscriber cannot access the main "Element Invader" dashboard page, the plugin may enqueue its scripts (and thus its nonces) on other admin pages or even the frontend.
- Identify Localization: Search for
wp_localize_scriptin the plugin source to find the JavaScript object name and nonce key.- Search Pattern:
grep -r "wp_localize_script" .
- Search Pattern:
- Determine Script Loading: Check where the script is enqueued (e.g.,
admin_enqueue_scriptsorwp_enqueue_scripts). - Extraction Method:
- Create a Subscriber user:
wp user create attacker attacker@example.com --role=subscriber --user_pass=password - If the script loads on the frontend: Navigate to the homepage as the Subscriber.
- If the script loads on the backend: Navigate to
/wp-admin/profile.phpas the Subscriber (Subscribers can always access this). - Browser Eval: Use
browser_evalto extract the nonce:window.elementinvader_settings?.nonceorwindow.ei_ajax?.nonce(Verify the exact name in Step 1).
- Create a Subscriber user:
5. Exploitation Strategy
Once the nonce and the vulnerable action are identified:
- Preparation: Log in as the Subscriber using the
browser_navigatetool to establish a session. - Request Construction: Use the
http_requesttool to send a POST request to/wp-admin/admin-ajax.php. - Payload Example (Inferred):
POST /wp-admin/admin-ajax.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded action=elementinvader_install_kit&nonce=EXTRACTED_NONCE&kit_id=123 - Success Condition: A response indicating success (e.g.,
{"success":true}) and a visible change in the WordPress environment (new templates created).
6. Test Data Setup
- Install Vulnerable Plugin: Ensure
elementinvaderversion 1.2.4 is active. - Subscriber Account: Create a user with the
subscriberrole. - Elementor Setup: Ensure Elementor is installed and active, as this plugin depends on it.
- Discovery: Run the following command to find the specific AJAX actions:
grep -rn "wp_ajax_elementinvader_" /var/www/html/wp-content/plugins/elementinvader/
7. Expected Results
- The
http_requestfrom the Subscriber user returns a status200 OKwith a success payload. - The application performs a task (like importing a template) that should be restricted to administrators.
- The response does NOT return a
403 Forbiddenor an error indicating insufficient permissions.
8. Verification Steps
- Check Post Count: If the action was a template import, check the database for new posts of type
elementor_library:wp post list --post_type=elementor_library - Check Plugin Options: If the action was a settings change, verify the option value:
wp option get elementinvader_settings - Review Response: Ensure the response body confirms execution.
9. Alternative Approaches
- Bypassing Nonce (if applicable): If
check_ajax_refereris called withdie=false, check if the function proceeds anyway without verifying the return value. - Frontend Leakage: Check if the nonce is enqueued via
wp_headfor all users. If so, this could potentially be upgraded to an Unauthenticated vulnerability ifwp_ajax_nopriv_is also used (unlikely given CVSS). - REST API: Check if the plugin registers any REST routes (
register_rest_route) without apermission_callback, as these often mirror AJAX functionality.
Summary
The Element Invader – Template Kits for Elementor plugin fails to perform capability checks on its AJAX handlers. This allows authenticated users with Subscriber-level privileges to perform administrative actions such as installing template kits or importing library data, which should be restricted to administrators.
Vulnerable Code
// File: elementinvader/includes/class-elementinvader-ajax.php (approximate path based on naming convention) public function install_kit() { // Check for nonce but missing current_user_can() check check_ajax_referer( 'elementinvader_nonce', 'nonce' ); $kit_id = isset( $_POST['kit_id'] ) ? sanitize_text_field( $_POST['kit_id'] ) : ''; // Proceed to perform administrative action without verifying authorization $this->process_kit_installation( $kit_id ); wp_send_json_success(); }
Security Fix
@@ -22,6 +22,10 @@ public function install_kit() { check_ajax_referer( 'elementinvader_nonce', 'nonce' ); + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( array( 'message' => __( 'Access Denied', 'elementinvader' ) ) ); + } + $kit_id = isset( $_POST['kit_id'] ) ? sanitize_text_field( $_POST['kit_id'] ) : ''; $this->process_kit_installation( $kit_id );
Exploit Outline
The exploit targets the AJAX endpoint /wp-admin/admin-ajax.php. An attacker must first authenticate as a Subscriber or higher. They then need to extract a valid nonce, which is typically exposed via wp_localize_script (e.g., in the elementinvader_settings JavaScript object) on pages where the plugin enqueues its assets, such as the user profile page. Once the nonce is obtained, the attacker sends a POST request to the AJAX endpoint with the action parameter set to elementinvader_install_kit (or other unprotected actions) and the stolen nonce. Because the server-side handler lacks a call to current_user_can(), it will execute privileged operations like kit installation or template modification for the non-privileged user.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.