# CVE-2023-25158: Unfiltered SQL Injection in Geotools

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 24.7, 25.7, 26.7, 27.4, 28.2 (CNA); fix release not confirmed
- Status: published
- Published: 2023-02-21 · Modified: 2025-03-10
- Aliases: GHSA-99c3-qc2q-p94m
- Record: https://cvemate.com/vulnerability/CVE-2023-25158 · JSON: https://cvemate.com/vulnerability/CVE-2023-25158/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 1.14%, percentile 67.706%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- geotools geotools: \< 27.4 \| \< 24.7 \| ≥ 25.0, \< 25.7 \| ≥ 26.0, \< 26.7 \| ≥ 27.0, \< 27.4 \| ≥ 28.0, \< 28.2
- org.geotools gt-jdbc (Maven): ≥ 28.0, \< 28.2 \| ≥ 27.0, \< 27.4 \| ≥ 26.0, \< 26.7 \| ≥ 25.0, \< 25.7 \| \< 24.7
- osgeo geotools: \< 24.7 \| ≥ 25.0, \< 25.7 \| ≥ 26.0, \< 26.7 \| ≥ 27.0, \< 27.4 \| ≥ 28.0, \< 28.2

## References

- <https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m>
- <https://github.com/geotools/geotools/commit/64fb4c47f43ca818c2fe96a94651bff1b3b3ed2b>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-25158>
- <https://github.com/geotools/geotools>

---

Data as of 2026-12-05T10:02:30.431Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
