Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS03ZzVmLXdyeDgtNWNjZs4AAxxV
GeoServer OGC Filter SQL Injection Vulnerabilities
Impact
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.
SQL Injection Vulnerabilities have been found with:
PropertyIsLike
filter, when used with a String field and any database DataStore, or with a PostGIS DataStore with encode functions enabledstrEndsWith
function, when used with a PostGIS DataStore with encode functions enabledstrStartsWith
function, when used with a PostGIS DataStore with encode functions enabledFeatureId
filter, when used with any database table having a String primary key column and when prepared statements are disabledjsonArrayContains
function, when used with a String or JSON field and with a PostGIS or Oracle DataStore (GeoServer 2.22.0+ only)DWithin
filter, when used with an Oracle DataStore
Patches
- GeoSever 2.21.4
- GeoServer 2.22.2
- GeoServer 2.20.7
- GeoServer 2.19.7
- GeoServer 2.18.7
Workarounds
- Disabling the PostGIS Datastore encode functions setting to mitigate
strEndsWith
,strStartsWith
vulnerabilities (Like filters have no mitigation, if there is a string field in the feature type published). - Enabling the PostGIS DataStore preparedStatements setting to mitigate the
FeatureId
vulnerability.
References
- OGC Filter SQL Injection Vulnerabilities (GeoTools)
- OGC Filter Injection Vulnerability Statement (GeoServer Blog)
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03ZzVmLXdyeDgtNWNjZs4AAxxV
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: almost 2 years ago
Updated: almost 2 years ago
CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Percentage: 0.50237
EPSS Percentile: 0.97632
Identifiers: GHSA-7g5f-wrx8-5ccf, CVE-2023-25157
References:
- https://github.com/geoserver/geoserver/security/advisories/GHSA-7g5f-wrx8-5ccf
- https://nvd.nist.gov/vuln/detail/CVE-2023-25157
- https://github.com/geoserver/geoserver/commit/145a8af798590288d270b240235e89c8f0b62e1d
- https://github.com/advisories/GHSA-7g5f-wrx8-5ccf
Blast Radius: 1.0
Affected Packages
maven:org.geoserver.community:gs-jdbcconfig
Affected Version Ranges: >= 2.22.0, < 2.22.2, < 2.21.4Fixed in: 2.22.2, 2.21.4