What’s Vulnerable › Vulnerabilities
CVE-2023-25157: Unfiltered SQL Injection Vulnerabilities in Geoserver
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 85.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2023-02-21 · updated 2026-06-17
- Weakness: CWE-89
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
- geoserver org.geoserver.extension:gs-db2: before 2.18.7; from 2.19.0 before 2.19.7; from 2.20.0 before 2.20.7; from 2.21.0 before 2.21.4; from 2.22.0 before 2.22.2 — fixed in 2.18.7, 2.19.7, 2.20.7, 2.21.4, 2.22.2
How to fix
Upgrade to a fixed version: geoserver org.geoserver.extension:gs-db2 2.18.7, 2.19.7, 2.20.7, 2.21.4. Check the vendor advisory for mitigations.
References
- https://github.com/geoserver/geoserver/commit/145a8af798590288d270b240235e89c8f0b62e1d
- https://github.com/geoserver/geoserver/security/advisories/GHSA-7g5f-wrx8-5ccf
- https://github.com/geoserver/geoserver/commit/145a8af798590288d270b240235e89c8f0b62e1d
- https://github.com/geoserver/geoserver/security/advisories/GHSA-7g5f-wrx8-5ccf
Get alerted when CVE-2023-25157 or the next vulnerability affects your stack