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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| geoserver | geoserver | >= 2.22.0, < 2.22.2, < 2.21.4 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 10 repositories
-
win3zz/CVE-2023-25157 ★ 166 · Jun 6, 2023
CVE-2023-25157 - GeoServer SQL Injection - PoC
-
murataydemir/CVE-2023-25157-and-CVE-2023-25158 ★ 13 · Jun 11, 2023
GeoServer & GeoTools SQL Injection (CVE-2023-25157 & CVE-2023-25158)
-
0x2458bughunt/CVE-2023-25157 ★ 10 · Jun 10, 2023
-
charis3306/CVE-2023-25157 ★ 3 · Apr 24, 2025
CVE-2023-25157 exp
-
7imbitz/CVE-2023-25157-checker ★ 3 · Jun 12, 2023
A script, written in golang. POC for CVE-2023-25157
-
dr-cable-tv/Geoserver-CVE-2023-25157 ★ 2 · Nov 28, 2023
Geoserver SQL Injection Exploit
-
ivanesk315/CVE-2023-25157 ★ 0 · Sep 10, 2026
-
Giangdurian/CVE-2023-25157-GeoServer-SQLi-Lab ★ 0 · Jul 13, 2026
-
custiya/geoserver-CVE-2023-25157 ★ 0 · Apr 21, 2025
-
Rubikcuv5/CVE-2023-25157 ★ 0 · Jul 31, 2023
GeoServer OGC Filter SQL Injection Vulnerabilities
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- GeoServer OGC Filter - SQL Injection http/cves/2023/CVE-2023-25157.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.geoserver.community:gs-jdbcconfig | < 2.21.4 | 2.21.4 | GHSA-7g5f-wrx8-5ccf |
| Maven | org.geoserver.community:gs-jdbcconfig | >= 2.22.0, < 2.22.2 | 2.22.2 | GHSA-7g5f-wrx8-5ccf |