CVE-2023-25158: Osgeo Geotools SQL Injection

CVE-2023-25158

NVDCVSS scored by security-advisories@github.com

Vulnerability 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 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.
Severity Level
CRITICAL(9.8)
Published Date
Feb 21, 2023
Last Modified
Nov 30, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Published
EPSS Score (30-Day)
1.10%Probability
Root Weakness (CWE)
Improper neutralization of special elements used in an SQL command, allowing attackers to modify queries.
CVSS v3.1 Base Metrics — Score 9.8 (CRITICAL)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • Osgeo Geotools < 24.7
  • Osgeo Geotools >= 25.0 and < 25.7
  • Osgeo Geotools >= 26.0 and < 26.7
  • Osgeo Geotools >= 27.0 and < 27.4
  • Osgeo Geotools >= 28.0 and < 28.2
  • geotools >= 28.0, < 28.2
  • geotools < 27.4
Patched Versions
  • Osgeo Geotools 24.7
  • Osgeo Geotools 25.7
  • Osgeo Geotools 26.7
  • Osgeo Geotools 27.4
  • Osgeo Geotools 28.2

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is critical.

  1. Check whether you run Osgeo Geotools and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Feb 21, 2023Published
  • Nov 30, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new Osgeo Geotools CVEsYou are reading CVE-2023-25158. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Sep 23, 2026 09:01 UTC