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

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.09%, higher than 66% of CVEs (2026-12-01)
- Published: 2023-02-21T20:57:47.754Z
- Modified: 2026-11-30T19:11:06.747Z
- Also known as: GHSA-99c3-qc2q-p94m
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- geotools geotools: >= 28.0, < 28.2; < 27.4
- org.geotools:gt-jdbc (Maven): from 28.0 before 28.2; from 27.0 before 27.4; from 26.0 before 26.7; from 25.0 before 25.7; before 24.7
- osgeo 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

## Every score

- GitHub_M: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/geotools/geotools/security/advisories/GHSA-99c3-qc2q-p94m> (mitigation, vendor-advisory, web)
- <https://github.com/geotools/geotools/commit/64fb4c47f43ca818c2fe96a94651bff1b3b3ed2b> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-25158> (advisory)
- <https://github.com/geotools/geotools> (package)

## Sources

- CVE List: [CVE-2023-25158](https://www.cve.org/CVERecord?id=CVE-2023-25158), CVE Terms of Use, modified 2025-03-10
- GitHub Advisory Database: [GHSA-99c3-qc2q-p94m](https://github.com/advisories/GHSA-99c3-qc2q-p94m), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2023-25158](https://nvd.nist.gov/vuln/detail/CVE-2023-25158), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2023-25158 · Whole record: https://cve.day/CVE-2023-25158.json · Rebuilt by cve.day 2026-11-30T19:17:12.971Z
