
Practical environment (Vulnerable Lab) and detailed exploitation analysis report for SQL Injection (Error-based) vulnerability in GeoServer (CVE-2023-25157) and the GeoTools library (CVE-2023-25158).
Please see the full analysis document with PoC images illustrating each layer in the official report:
(The report includes: Root cause at the CQL Parser & SQL Translator layer, explanation of the OGC XML Filter format, detailed analysis of 4 attack vectors, payloads, actual SQL queries beneath the Database, and remediation recommendations).
In this lab, 4 actual attack vectors have been verified and analyzed in detail in REPORT.md:
strStartsWith): Exploitation via string prefix check function in CQL_FILTER (HTTP GET).strEndsWith): Exploitation via string suffix check function in CQL_FILTER (HTTP GET).PropertyIsLike): Exploitation via the standard OGC XML Filter tag manipulating the escape character (HTTP POST) — Most dangerous vector works on all default configurations.FeatureId): Exploitation via the String Primary Key filter parameter when preparedStatements = false.In the project root directory, open a Terminal and run the command:
docker compose up -d
The system will start 2 containers:
vulhub database containing tables example and example_str).Check GeoServer logs to ensure the service has started completely:
docker compose logs -f geoserver
When the message CONFIGURATION COMPLETE appears, you can access GeoServer at:
http://localhost:8080/geoserver/web/admin / geoserverTo stop containers and free resources:
# Tắt lab (giữ lại dữ liệu database)
docker compose down
# Tắt lab và xóa sạch toàn bộ dữ liệu volume
docker compose down -v
├── REPORT.md # Báo cáo phân tích kỹ thuật & PoC chi tiết
├── docker-compose.yml # Cấu hình khởi tạo môi trường lab GeoServer + PostgreSQL
├── init.sql # Script khởi tạo database và dữ liệu mẫu cho lab
├── startup.sh # Script cấu hình tự động GeoServer khi khởi chạy container
└── img/ # Thư mục chứa hình ảnh minh chứng PoC
| Attribute | Details |
|---|
| CVE ID | CVE-2023-25157 (GeoServer) & CVE-2023-25158 (GeoTools) |
| Vulnerability Type | Error-based SQL Injection |
| Severity | Critical — CVSS v3.1: 9.8 |
| Affected Products | GeoServer < 2.23.1, < 2.22.3, < 2.21.4 / GeoTools < 29.2, < 28.4, < 27.5 |
| Exploitation Protocol | OGC Web Feature Service (WFS) v1.0.0 / v2.0.0 |
| Authentication Required | None required (when WFS service is configured with AccessConstraints: NONE) |