要点
- CVE-2023-25158 は org.geotools:gt-jdbc, geotools (geotools) に影響する深刻度「緊急」 (CVSS 9.8) の脆弱性です。
- 今後30日間に悪用される確率(EPSS):1.1%(全脆弱性の 65.5% より高い)。
- 対処:25.7, 26.7, 27.4, 28.2 以降に更新してください。
| パッケージ | 影響を受けるバージョン | 修正済みバージョン |
|---|
| org.geotools:gt-jdbc Maven | ≥ 25.0, < 25.7≥ 26.0, < 26.7≥ 27.0, < 27.4≥ 28.0, < 28.2< 24.7
| 25.726.727.428.224.7
|
| geotools | ≥ 25.0, < 25.7≥ 26.0, < 26.7≥ 27.0, < 27.4≥ 28.0, < 28.2< 24.7
| 25.726.727.428.224.7
|
概要
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:
PropertyIsLike filter
- Requires PostGIS DataStore with "encode functions" enabled
- Or any JDBCDataStore (all relational databases) with String field (no mitigation)
strEndsWith function
- Requires PostGIS DataStore with "encode functions" enabled
strStartsWith function
- Requires PostGIS DataStore with "encode functions" enabled
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)
jsonArrayContains function
- Requires PostGIS and Oracle DataStore with String or JSON field
DWithin filter
- Happens only in Oracle DataStore, no mitigation
Patches
- GeoTools 28.2
- GeoTools 27.4
- GeoTools 26.7
- GeoTools 25.7
- GeoTools 24.7
Workarounds
Partial mitigation:
- In PostGIS DataStore disable "encode functions"
- In any PostGIS enable "prepared statements" (only database with such settings)
Map<String, Object> params = new HashMap<>();
params.put("dbtype", "postgis");
params.put("host", "localhost");
params.put("port", 5432);
params.put("schema", "public");
params.put("database", "database");
params.put("user", "postgres");
params.put("passwd", "postgres");
params.put("preparedStatements", true ); // mitigation
params.put("encode functions", false ); // mitigation
DataStore dataStore = DataStoreFinder.getDataStore(params);
References
NVD の説明
GeoTools is an open source Java library that provides tools for geospatial data. 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. Users are advised to upgrade to either version 27.4 or to 28.2 to resolve this issue. Users unable to upgrade may disable `encode functions` for PostGIS DataStores or enable `prepared statements` for JDBCDataStores as a partial mitigation.
これらの製品をお使いですか?サイトをスキャンして、脆弱なバージョンが公開されていないか確認しましょう。
無料でサイトをスキャン