← Vulnerability feed

Vulnerability record · CVE-2023-25157 · published 21 February 2023

CVE-2023-25157: GeoServer OGC filter SQL injection via CQL and PostGIS datastore

Osgeo · Geoserver

GeoServer supports the OGC Filter expression language and CQL through WFS, WMS and WCS, and mishandles certain filter constructs when a PostGIS datastore is used. This allows SQL injection into backend queries, which matters because GeoServer is commonly internet-facing and the flaw is trivially reachable without credentials.

9.8 CVSS 3.1 Critical EPSS 85% · top 0.3% CWE-89 · SQL injection
9.8CVSS 3.1 base score
85%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
4References
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

critical priorityCVSS 9.8 with network reachability, no authentication and no user interaction, combined with a very high EPSS probability, makes this an urgent patch target.

What it is

GeoServer supports the OGC Filter expression language and CQL through WFS, WMS and WCS, and mishandles certain filter constructs when a PostGIS datastore is used. This allows SQL injection into backend queries, which matters because GeoServer is commonly internet-facing and the flaw is trivially reachable without credentials.

Impact

An unauthenticated attacker can inject arbitrary SQL into the PostGIS database, potentially reading, altering or deleting spatial and non-spatial data and, depending on database privileges, executing database functions. Full loss of confidentiality, integrity and availability of the backend data is possible.

Attack surface

Reached over the network through GeoServer's OGC endpoints (WFS, WMS, and WCS for ImageMosaic coverages) by sending crafted filter or CQL expressions. No authentication or user interaction is required per the CVSS vector (AV:N/AC:L/PR:N/UI:N).

Exploitation

Not listed in CISA KEV and no ransomware usage is documented, but EPSS is very high at 0.852 (99.7th percentile), indicating strong likelihood of exploitation. References are limited to the vendor advisory and patch commit, with no public exploit tag in the record.

What to do

  • Upgrade GeoServer to 2.21.4 or 2.22.2 as advised by the vendor.
  • If upgrade is not possible, disable the PostGIS Datastore 'encode functions' setting to mitigate strEndsWith, strStartsWith and PropertyIsLike misuse.
  • Enable the PostGIS DataStore 'preparedStatements' setting to mitigate FeatureId misuse.
  • Restrict network exposure of GeoServer OGC endpoints to trusted clients and place them behind authentication where feasible.
  • Run the PostGIS datastore account with least privilege to limit the impact of successful injection.

Detection

  • Inspect GeoServer and reverse-proxy access logs for OGC requests containing SQL metacharacters, UNION, stacked queries, or unusual CQL/filter syntax.
  • Monitor PostGIS query logs for malformed or unexpected SQL originating from the GeoServer application account.
  • Alert on anomalous request patterns to WFS, WMS and WCS endpoints, especially unauthenticated bursts from single sources.
  • Check GeoServer configuration for the PostGIS encode functions and preparedStatements settings to confirm mitigations are applied.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2023-25157 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2023-43795GeoServer WPS server-side request forgeryGeoServer's OGC Web Processing Service (WPS) accepts GET and POST requests and does not adequately restrict the targets it fetches, allowing server-s…EPSS 68%analysed9.1CVE-2025-30220Geotools xml external entity (xxe) vulnerabilityGeoServer is an open source server that allows users to share and edit geospatial data. GeoTools Schema class use of Eclipse XSD library to represent…EPSS 42%8.2CVE-2025-58175Osgeo geoserver improper input validation vulnerabilityGeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.26.4 and 2.27.3, a GeoServer that uses `E…EPSS 0.47%8.2CVE-2024-29198Osgeo geoserver server-side request forgery (ssrf) vulnerabilityGeoServer is an open source software server written in Java that allows users to share and edit geospatial data. It possible to achieve Service Side …EPSS 2.3%8.2CVE-2024-34711Osgeo geoserver information exposure vulnerabilityGeoServer is an open source server that allows users to share and edit geospatial data. An improper URI validation vulnerability exists that enables …EPSS 0.30%7.5CVE-2025-30145Osgeo geoserver vulnerabilityGeoServer is an open source server that allows users to share and edit geospatial data. Malicious Jiffle scripts can be executed by GeoServer, either…EPSS 0.51%7.5CVE-2024-38524Osgeo geoserver information exposure vulnerabilityGeoServer is an open source server that allows users to share and edit geospatial data. org.geowebcache.GeoWebCacheDispatcher.handleFrontPage(HttpSer…EPSS 0.44%7.5CVE-2021-40822Osgeo geoserver server-side request forgery (ssrf) vulnerabilityGeoServer through 2.18.5 and 2.19.x through 2.19.2 allows SSRF via the option for setting a proxy host.EPSS 19%

Source: NIST National Vulnerability Database (record CVE-2023-25157), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.