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 DataStorestrEndsWith
, strStartsWith
vulnerabilities (Like filters have no mitigation, if there is a string field in the feature type published).FeatureId
vulnerability.{ "nvd_published_at": "2023-02-21T22:15:00Z", "github_reviewed_at": "2023-02-22T19:15:56Z", "severity": "CRITICAL", "github_reviewed": true, "cwe_ids": [ "CWE-89" ] }