What’s Vulnerable › Vulnerabilities
CVE-2023-25158: Unfiltered SQL Injection in Geotools
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-02-21 · updated 2026-06-17
- Weakness: CWE-89
Description
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.
Affected products
- geotools: before 24.7; from 25.0 before 25.7; from 26.0 before 26.7; from 27.0 before 27.4; from 28.0 before 28.2 — fixed in 24.7, 25.7, 26.7, 27.4, 28.2
How to fix
Upgrade to a fixed version: geotools 24.7, 25.7, 26.7, 27.4. Check the vendor advisory for mitigations.
References
- https://github.com/geotools/geotools/commit/64fb4c47f43ca818c2fe96a94651bff1b3b3ed2b
- https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m
- https://github.com/geotools/geotools/commit/64fb4c47f43ca818c2fe96a94651bff1b3b3ed2b
- https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m
Get alerted when CVE-2023-25158 or the next vulnerability affects your stack