CVE-2023-25158CWE-89

Unfiltered SQL Injection in Geotools

Critical · published February 21, 2023

CVSS v3.1
9.8
EPSS
1%
Percentile
65.3
In the wild
Unconfirmed
What it is

🚨 SQL injection vulnerabilities in GeoTools' JDBCDataStore implementations could leave sensitive geospatial data wide open, like leaving the front door unlocked at a data party! 🔥 Think of GeoTools like a delivery service that interprets specific addresses (OGC Filters) to fetch packages (geospatial data). If the address is misinterpreted due to a lack of verification, the wrong packages could be delivered, or worse, anyone could access sensitive ones! An attacker could exploit this vulnerability to execute arbitrary SQL commands, allowing complete control over the database. This can lead to unauthorized data access, modification, or even deletion — truly a security nightmare for any application relying on geospatial data!

Put simply

Think of GeoTools like a delivery service that interprets specific addresses (OGC Filters) to fetch packages (geospatial data). If the address is misinterpreted due to a lack of verification, the wrong packages could be delivered, or worse, anyone could access sensitive ones! This SQL injection vulnerability arises from improperly handled OGC Filters within JDBCDataStore implementations, allowing an attacker to manipulate SQL queries sent to the database.

What to do

An attacker could exploit this vulnerability to execute arbitrary SQL commands, allowing complete control over the database. This can lead to unauthorized data access, modification, or even deletion — truly a security nightmare for any application relying on geospatial data! To mitigate this issue, immediately upgrade to GeoTools version 27.4 or 28.2. If upgrading isn't possible, disable `encode functions` for PostGIS DataStores or enable `prepared statements` for JDBCDataStores to reduce risks. You've got this! With these steps, you can secure your geospatial data like a pro! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01095 · 65.3th percentile
Weakness
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Published
2023-02-21T20:57Z
EPSS history
Timeline
  • 21 FEB 20:57Z
    Unfiltered SQL Injection in Geotools
    cvelistv5