Critical, CVSS 9.8MavenPublished
GeoTools OGC Filter SQL Injection Vulnerabilities
CVE-2023-25158 · GHSA-99c3-qc2q-p94m
- Affected
- Maven org.geotools:gt-jdbc >= 28.0, < 28.2; >= 27.0, < 27.4; >= 26.0, < 26.7; >= 25.0, < 25.7; < 24.7
- Fixed in
- 24.725.728.227.426.7· Vendor fix available
- Issue
- Impact GeoTools includes support for OGC Filter expression language parsing, encoding and execution against a range of datastore. SQL Injection Vulnerabilities have been found when executing OGC Filters with JDBCDataStore implementations: 1. PropertyIsLike filter Requires PostGIS DataStore with "encode functions" enabled Or any JDBCDataStore (all relational databases) with String field (no mitigation) 3. strEndsWith function Requires PostGIS DataStore with "encode functions" enabled 5. strStartsWith function Requires PostGIS DataStore with "encode functions" enabled 6. FeatureId filter Requires JDBCDataStore (all relational databases) with prepared statements disabled and table with String primary key (Oracle not affected, SQL Server and MySQL have no settings to enabled prepared statements, PostGIS does) 7. jsonArrayContains function Requires PostGIS and Oracle DataStore with String or JSON field 8. DWithin filter Happens only in Oracle DataStore, no mitigation Patches GeoTools 28.2…
Recommended action: Upgrade to 28.2, 27.4, 26.7 or 2 more by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.