{"id":"CVE-2023-25158","title":"GeoTools is an open source Java library that provides tools for geospatial data","summary":"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 hav…","severity":"critical","cvss":9.8,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-89","CWE-89"],"vendor":"osgeo","product":"geotools","affected":["geotools < 24.7","geotools >= 25.0, < 25.7","geotools >= 26.0, < 26.7","geotools >= 27.0, < 27.4","geotools >= 28.0, < 28.2"],"patched":["geotools 28.2"],"published":"2023-02-21","updated":"2026-11-30","sourceUpdated":"2026-11-30T19:11:06.747","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2023-25158","references":[{"url":"https://github.com/geotools/geotools/commit/64fb4c47f43ca818c2fe96a94651bff1b3b3ed2b","label":"security-advisories@github.com"},{"url":"https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m","label":"security-advisories@github.com"},{"url":"https://github.com/geotools/geotools/commit/64fb4c47f43ca818c2fe96a94651bff1b3b3ed2b","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m","label":"af854a3a-2127-422b-91ae-364da2661108"}],"tags":["nvd"],"epss":0.0114,"epssPercentile":0.67584,"ingestedAt":"2026-11-30T19:45:10.588Z","slug":"CVE-2023-25158","body":"## Overview\n\nGeoTools 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.\n\n## Affected\n\n- `geotools < 24.7`\n- `geotools >= 25.0, < 25.7`\n- `geotools >= 26.0, < 26.7`\n- `geotools >= 27.0, < 27.4`\n- `geotools >= 28.0, < 28.2`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `geotools 28.2`","depth":"midnight","depthScore":54,"depthScoreParts":{"impact":53.9,"likelihood":0.2,"exploitation":0,"ransomware":0},"changes":[]}