CVE-2023-25157

CRITICAL EXPLOITED NUCLEI LAB

GeoServer < 2.18.7 and 2.18.7-2.21.4 - SQL Injection via OGC Filter and CQL Expressions

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2023-25157 has been observed exploited in the wild (reported by VulnCheck KEV). EIP tracks 9 public exploits from researchers including win3zz, murataydemir, 0x2458bughunt. A Nuclei detection template is also available.

AI-analyzed exploit summary This repository contains a functional Python script that exploits CVE-2023-25157, an SQL injection vulnerability in GeoServer's OGC Filter functionality. The script automates the discovery of feature types and properties, then injects a malicious payload via the CQL_FILTER parameter to extract database version information.

Description

GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. GeoServer includes support for the OGC Filter expression language and the OGC Common Query Language (CQL) as part of the Web Feature Service (WFS) and Web Map Service (WMS) protocols. CQL is also supported through the Web Coverage Service (WCS) protocol for ImageMosaic coverages. Users are advised to upgrade to either version 2.21.4, or version 2.22.2 to resolve this issue. Users unable to upgrade should disable the PostGIS Datastore *encode functions* setting to mitigate ``strEndsWith``, ``strStartsWith`` and ``PropertyIsLike `` misuse and enable the PostGIS DataStore *preparedStatements* setting to mitigate the ``FeatureId`` misuse.

Exploits (9)

nomisec WORKING POC 170 stars
by win3zz · infoleak
https://github.com/win3zz/CVE-2023-25157

This repository contains a functional Python script that exploits CVE-2023-25157, an SQL injection vulnerability in GeoServer's OGC Filter functionality. The script automates the discovery of feature types and properties, then injects a malicious payload via the CQL_FILTER parameter to extract database version information.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: GeoServer (versions affected by CVE-2023-25157)
No auth needed
Prerequisites: Target URL with exposed GeoServer WFS service · Network access to the target
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WRITEUP 14 stars
by murataydemir · remote
https://github.com/murataydemir/CVE-2023-25157-and-CVE-2023-25158

This repository provides a detailed technical analysis of SQL injection vulnerabilities (CVE-2023-25157 and CVE-2023-25158) in GeoServer and GeoTools, including affected versions, root causes, and mitigation strategies. It does not contain exploit code but offers in-depth explanations of the vulnerabilities.

Classification
Writeup 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Theoretical
Target: GeoServer (< 2.21.4, >= 2.22.0, < 2.22.2), GeoTools (< 28.2, < 27.4, < 26.7, < 25.7, < 24.7)
No auth needed
Prerequisites: Access to a vulnerable GeoServer or GeoTools instance · Knowledge of OGC filter expressions
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec SCANNER 10 stars
by 0x2458bughunt · infoleak
https://github.com/0x2458bughunt/CVE-2023-25157

The repository contains Python scripts to scan for GeoServer instances vulnerable to CVE-2023-25157 by checking for specific paths and keywords, but does not include functional exploit code for SQL injection.

Classification
Scanner 90%
Attack Type
Sqli
Complexity
Trivial
Reliability
Reliable
Target: GeoServer
No auth needed
Prerequisites: List of target hosts or a file containing target hosts
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 3 stars
by charis3306 · remote
https://github.com/charis3306/CVE-2023-25157

This repository contains a functional exploit for CVE-2023-25157, a SQL injection vulnerability in GeoServer due to improper input filtering. The exploit automates the discovery of vulnerable endpoints and properties, then constructs malicious CQL_FILTER queries to extract database version information.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: GeoServer 2.18.x < 2.18.7, 2.19.x < 2.19.7, 2.20.x < 2.20.7, 2.21.x < 2.21.4, 2.22.x < 2.22.2
No auth needed
Prerequisites: Network access to the GeoServer instance · WFS service enabled
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 3 stars
by 7imbitz · remote
https://github.com/7imbitz/CVE-2023-25157-checker

This repository contains a functional Go script that checks for CVE-2023-25157, a SQL injection vulnerability in GeoServer. The script enumerates available feature names and properties, then tests for vulnerability by injecting a crafted CQL_FILTER payload to extract the current user.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: GeoServer (versions affected by CVE-2023-25157)
No auth needed
Prerequisites: Access to the GeoServer WFS endpoint
devstral-2 · analyzed Feb 18, 2026 Full analysis →
github WORKING POC 2 stars
by Pr0t0c01 · pythonpoc
https://github.com/Pr0t0c01/CVEs/tree/main/GeoServer_CVE-2023-25157

The repository contains functional exploit code for CVE-2023-25157, specifically targeting GeoServer. The exploit leverages a path traversal vulnerability to access sensitive files on the server.

Classification
Working Poc 95%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: GeoServer
No auth needed
Prerequisites: Network access to the target server
devstral-2 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC 2 stars
by dr-cable-tv · infoleak
https://github.com/dr-cable-tv/Geoserver-CVE-2023-25157

This repository contains a functional exploit for CVE-2023-25157, a SQL injection vulnerability in GeoServer. The exploit automates the detection and exploitation of the vulnerability across different database backends (PostgreSQL, Oracle, MSSQL/MySQL) by crafting malicious CQL_FILTER queries.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: GeoServer (versions affected by CVE-2023-25157)
No auth needed
Prerequisites: Target must be running a vulnerable version of GeoServer · Network access to the GeoServer instance
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC
by custiya · infoleak
https://github.com/custiya/geoserver-CVE-2023-25157

This repository contains a functional exploit PoC for CVE-2023-25157, a SQL injection vulnerability in GeoServer 2.22.0. The exploit leverages a maliciously crafted CQL_FILTER parameter in a WFS request to execute arbitrary SQL queries, demonstrating the vulnerability by extracting the PostgreSQL version.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: GeoServer 2.22.0
No auth needed
Prerequisites: Access to the GeoServer WFS endpoint · PostgreSQL backend configured
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec SCANNER
by Rubikcuv5 · poc
https://github.com/Rubikcuv5/CVE-2023-25157

The repository contains a Python script that scans for GeoServer OGC Filter SQL Injection vulnerabilities (CVE-2023-25157) by retrieving feature types and properties but does not include exploit code for actual SQL injection.

Classification
Scanner 90%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: GeoServer
No auth needed
Prerequisites: Access to the target GeoServer instance
devstral-2 · analyzed Feb 18, 2026 Full analysis →

Nuclei Templates (1)

GeoServer OGC Filter - SQL Injection
CRITICALVERIFIEDby ritikchaddha,DhiyaneshDK,iamnoooob,rootxharsh
Shodan: title:"geoserver" || http.title:"geoserver"
FOFA: title="geoserver" || app="geoserver"

Scores

CVSS v3 9.8
EPSS 0.9406
EPSS Percentile 99.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable yes
Technical Impact total

Lab Environment

COMMUNITY
Community Lab
docker pull vulhub/geoserver:2.22.1
docker pull postgis/postgis:14-3.3-alpine
+7 more repos

Details

VulnCheck KEV 2020-09-22
CWE
CWE-89
Status published
Products (2)
org.geoserver.community/gs-jdbcconfig 0 - 2.21.4Maven
osgeo/geoserver < 2.18.7
Published Feb 21, 2023
Tracked Since Feb 18, 2026