Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-103913 Overview
CVE-2026-103913 is a SQL Injection vulnerability [CWE-89] in the GeoDirectory plugin for WordPress, affecting all versions up to and including 2.8.186. The flaw resides in the geodir_gps_query_part() function, which interpolates stored latitude and longitude coordinates directly into a SQL distance sub-expression. Because coordinates are not numerically validated when a listing is saved, authenticated attackers with Subscriber-level access can poison the stored values with SQL payloads. The payload is executed when the public wp_ajax_nopriv_geodir_widget_listings handler is invoked with set_post=<pending-listing-id> and sort_by=distance_asc, allowing extraction of sensitive database contents.
Critical Impact
Authenticated attackers with Subscriber-level access can execute arbitrary SQL queries against the WordPress database, enabling exfiltration of user credentials, session tokens, and other sensitive data stored in wp_users and wp_usermeta.
Affected Products
- GeoDirectory plugin for WordPress — versions ≤ 2.8.186
- Fixed in GeoDirectory 2.8.187 (per upstream changeset 3723536)
- Any WordPress site exposing the wp_ajax_nopriv_geodir_widget_listings AJAX handler
Discovery Timeline
- 2026-10-03 - CVE-2026-103913 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-103913
Vulnerability Analysis
The vulnerability is a second-order SQL injection. Attack data enters the application during the listing-save flow in class-geodir-post-data.php, where coordinate fields are persisted without numeric validation or SQL escaping. The injected string remains dormant until the AJAX endpoint wp_ajax_nopriv_geodir_widget_listings (registered in class-geodir-ajax.php) is called with a set_post parameter referencing the pending listing and sort_by=distance_asc. At that point, geodir_gps_query_part() in general-functions.php reads the stored latitude and longitude and interpolates them directly into the SELECT statement's Haversine distance expression. The attacker-controlled fragment becomes part of the executed query, allowing UNION-based or time-based data extraction.
Root Cause
Two defects combine to produce the vulnerability. First, listing save routines accept arbitrary strings for latitude and longitude without casting to float or validating against a coordinate range. Second, geodir_gps_query_part() concatenates those stored strings into SQL rather than using parameterized placeholders through $wpdb->prepare(). Either control would have broken the injection chain.
Attack Vector
Exploitation requires only a Subscriber account, the lowest authenticated role in WordPress. The attacker submits a pending listing containing a crafted latitude or longitude field, then calls the unauthenticated-friendly AJAX action with set_post=<pending-listing-id>&sort_by=distance_asc. The vulnerability does not require user interaction and is reachable over the network. See the Wordfence Vulnerability Analysis and the vulnerable GeoDirectory distance query function for the sink location.
// Vulnerable pattern (conceptual, derived from upstream source)
// Stored lat/lng are interpolated directly into the SQL distance expression
// rather than passed as %f placeholders via $wpdb->prepare().
// See: includes/general-functions.php#L1312 and #L1394
Detection Methods for CVE-2026-103913
Indicators of Compromise
- Requests to /wp-admin/admin-ajax.php with action=geodir_widget_listings, sort_by=distance_asc, and a set_post parameter referencing a pending listing ID.
- Rows in the GeoDirectory listings tables where latitude or longitude columns contain non-numeric characters, SQL keywords (UNION, SELECT, SLEEP), or comment markers (--, #, /*).
- Database error entries or unusually long query execution times logged by wpdb or the MySQL slow query log for listing-widget queries.
Detection Strategies
- Scan the GeoDirectory posts and detail tables for coordinate values that fail a strict FLOAT cast or fall outside the valid ranges -90..90 and -180..180.
- Alert on authenticated Subscriber accounts creating listings immediately followed by wp_ajax_nopriv_geodir_widget_listings requests referencing their own set_post ID.
- Deploy a Web Application Firewall rule to flag admin-ajax.php requests containing sort_by=distance_asc paired with set_post parameters.
Monitoring Recommendations
- Forward WordPress access logs and MySQL general or slow query logs to a centralized analytics tier for query-pattern analysis.
- Monitor for sudden spikes in Subscriber-role registrations followed by listing-creation activity on sites running GeoDirectory.
- Baseline normal GeoDirectory AJAX traffic volumes and alert on deviations in geodir_widget_listings request patterns.
How to Mitigate CVE-2026-103913
Immediate Actions Required
- Upgrade GeoDirectory to version 2.8.187 or later, which applies the fix shipped in changeset 3723536.
- Audit existing listings for malformed latitude or longitude values and sanitize or remove rows containing non-numeric content.
- Rotate database credentials, WordPress salts in wp-config.php, and administrator passwords if exploitation is suspected.
Patch Information
The GeoDirectory maintainers addressed the issue in version 2.8.187. The patch enforces numeric validation on coordinate inputs and binds the values through $wpdb->prepare() with %f placeholders in geodir_gps_query_part(). Review the upstream GeoDirectory changeset for the exact code changes.
Workarounds
- Disable or deactivate the GeoDirectory plugin until the upgrade can be deployed.
- Restrict Subscriber-level registration by setting Anyone can register to disabled under WordPress Settings → General.
- Block requests to admin-ajax.php carrying both action=geodir_widget_listings and sort_by=distance_asc at the WAF or reverse proxy tier.
# Example: block the vulnerable AJAX pattern at an nginx reverse proxy
if ($args ~* "action=geodir_widget_listings.*sort_by=distance_asc") {
return 403;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

