GEO my WP WordPress Plugin SQL Injection Vulnerability (CVE-2026-9757)
The GEO my WP plugin for WordPress is vulnerable to SQL Injection (CVE-2026-9757) via the 'swlatlng' and 'nelatlng' parameters, allowing unauthenticated attackers to extract sensitive information from the database by injecting SQL queries into a BETWEEN clause.
The GEO my WP plugin, a WordPress plugin designed for location-based functionality, contains a SQL injection vulnerability (CVE-2026-9757) in versions up to and including 4.5.5. The vulnerability lies within the handling of the ‘swlatlng’ and ’nelatlng’ parameters, which are used to define geographical boundaries for searches. These parameters are extracted from the $_SERVER['QUERY_STRING'] array using parse_str(), bypassing the standard WordPress magic quotes protection, and are subsequently incorporated into a SQL query without proper sanitization or validation. This flaw enables unauthenticated attackers to inject arbitrary SQL code into the query, potentially leading to the extraction of sensitive data from the WordPress database. Successful exploitation requires the presence of the [gmw form="results" form_id=N] shortcode on a publicly accessible page and at least one post with an associated gmw_location entry.
Attack Chain
- An unauthenticated attacker crafts a malicious HTTP request targeting a WordPress page containing the
[gmw form="results" form_id=N]shortcode. - The malicious request includes the
swlatlngand/ornelatlngparameters in the URL’s query string, containing SQL injection payloads. - WordPress’s
parse_str()function parses the query string from$_SERVER['QUERY_STRING'], extracting the injected parameters. Critically, this bypasseswp_magic_quotesprotection. - The
gmw_get_locations_within_boundaries_sql()function receives the unsanitizedswlatlngandnelatlngparameters. - The
explode()function splits the parameters by commas, creating fragments. - These fragments are directly interpolated into a SQL
BETWEENclause within thegmw_get_locations_within_boundaries_sql()function without any validation (e.g.is_numeric()), casting to float, or sanitization (e.g.esc_sql()or$wpdb->prepare()). - The injected SQL code is executed against the WordPress database.
- The attacker extracts sensitive information, such as user credentials or other plugin data, from the database using the injected SQL queries.
Impact
Successful exploitation of this SQL injection vulnerability (CVE-2026-9757) allows unauthenticated attackers to execute arbitrary SQL queries against the WordPress database. This can lead to the disclosure of sensitive information, including user credentials, database configurations, and other confidential data stored within the database. A successful attack could compromise the entire WordPress installation and potentially any other applications sharing the same database server. The CVSS v3.1 base score for this vulnerability is 7.5, indicating a high severity.
Recommendation
- Upgrade the GEO my WP plugin to the latest version, which includes a fix for CVE-2026-9757.
- Deploy the Sigma rule “Detect CVE-2026-9757 Exploitation Attempt — GEO my WP SQL Injection” to your SIEM to detect exploitation attempts based on suspicious query string parameters.
- Monitor web server logs for requests containing the
swlatlngandnelatlngparameters in the query string with SQL injection syntax, as detected by the Sigma rule above.
Detection coverage 2
Detect CVE-2026-9757 Exploitation Attempt — GEO my WP SQL Injection
highDetects CVE-2026-9757 exploitation attempt — SQL injection via crafted swlatlng or nelatlng parameters in GEO my WP plugin requests.
Detect WordPress Requests Bypassing wp_magic_quotes
mediumDetects requests to WordPress bypassing the now-deprecated wp_magic_quotes protection using $_SERVER['QUERY_STRING'].
Detection queries are available on the platform. Get full rules →