GHSA-7G5F-WRX8-5CCF
Vulnerability from github – Published: 2023-02-22 19:15 – Updated: 2023-02-22 19:15
VLAI?
Summary
GeoServer OGC Filter SQL Injection Vulnerabilities
Details
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:
PropertyIsLikefilter, when used with a String field and any database DataStore, or with a PostGIS DataStore with encode functions enabledstrEndsWithfunction, when used with a PostGIS DataStore with encode functions enabledstrStartsWithfunction, when used with a PostGIS DataStore with encode functions enabledFeatureIdfilter, when used with any database table having a String primary key column and when prepared statements are disabledjsonArrayContainsfunction, when used with a String or JSON field and with a PostGIS or Oracle DataStore (GeoServer 2.22.0+ only)DWithinfilter, 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,strStartsWithvulnerabilities (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
FeatureIdvulnerability.
References
- OGC Filter SQL Injection Vulnerabilities (GeoTools)
- OGC Filter Injection Vulnerability Statement (GeoServer Blog)
Severity ?
9.8 (Critical)
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.geoserver.community:gs-jdbcconfig"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.21.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.geoserver.community:gs-jdbcconfig"
},
"ranges": [
{
"events": [
{
"introduced": "2.22.0"
},
{
"fixed": "2.22.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-25157"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2023-02-22T19:15:56Z",
"nvd_published_at": "2023-02-21T22:15:00Z",
"severity": "CRITICAL"
},
"details": "### Impact\n\nGeoServer 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.\n\nSQL Injection Vulnerabilities have been found with:\n\n* ``PropertyIsLike`` filter, when used with a String field and any database DataStore, or with a PostGIS DataStore with encode functions enabled\n* ``strEndsWith`` function, when used with a PostGIS DataStore with encode functions enabled\n* ``strStartsWith`` function, when used with a PostGIS DataStore with encode functions enabled\n* ``FeatureId`` filter, when used with any database table having a String primary key column and when prepared statements are disabled\n* ``jsonArrayContains`` function, when used with a String or JSON field and with a PostGIS or Oracle DataStore (GeoServer 2.22.0+ only)\n* ``DWithin`` filter, when used with an Oracle DataStore\n\n### Patches\n\n* GeoSever 2.21.4\n* GeoServer 2.22.2\n* GeoServer 2.20.7\n* GeoServer 2.19.7\n* GeoServer 2.18.7\n\n### Workarounds\n\n1. 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).\n2. Enabling the PostGIS DataStore *preparedStatements* setting to mitigate the ``FeatureId`` vulnerability.\n\n### References\n\n* [OGC Filter SQL Injection Vulnerabilities](https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m) (GeoTools)\n* [OGC Filter Injection Vulnerability Statement](https://geoserver.org/vulnerability/2023/02/20/ogc-filter-injection.html) (GeoServer Blog)",
"id": "GHSA-7g5f-wrx8-5ccf",
"modified": "2023-02-22T19:15:56Z",
"published": "2023-02-22T19:15:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/geoserver/geoserver/security/advisories/GHSA-7g5f-wrx8-5ccf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-25157"
},
{
"type": "WEB",
"url": "https://github.com/geoserver/geoserver/commit/145a8af798590288d270b240235e89c8f0b62e1d"
},
{
"type": "PACKAGE",
"url": "https://github.com/geoserver/geoserver"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "GeoServer OGC Filter SQL Injection Vulnerabilities"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…