The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2023-25158

CVE-2023-25158: GeoTools JDBC SQL Injection Vulnerability

CVE-2023-25158 is an SQL injection flaw in GeoTools affecting OGC Filter execution with JDBCDataStore implementations. Attackers can exploit this to manipulate database queries. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: January 28, 2026

CVE-2023-25158 Overview

CVE-2023-25158 is a SQL Injection vulnerability affecting GeoTools, an open source Java library that provides tools for geospatial data processing. The vulnerability exists in the OGC Filter expression language parsing, encoding, and execution functionality when used with JDBCDataStore implementations. Attackers can exploit this flaw to inject malicious SQL commands through crafted OGC Filter expressions, potentially leading to unauthorized database access, data exfiltration, or complete database compromise.

Critical Impact

This SQL Injection vulnerability allows unauthenticated remote attackers to execute arbitrary SQL commands against backend databases through malicious OGC Filter expressions, potentially compromising data confidentiality, integrity, and availability.

Affected Products

  • GeoTools versions prior to 27.4
  • GeoTools versions 28.x prior to 28.2
  • Applications using JDBCDataStore implementations with OGC Filter support

Discovery Timeline

  • 2023-02-21 - CVE CVE-2023-25158 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-25158

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) resides in GeoTools' OGC Filter expression language processing components. GeoTools provides comprehensive support for parsing, encoding, and executing OGC Filter expressions against various data stores. When these filter expressions are processed by JDBCDataStore implementations, insufficient input validation allows attackers to inject malicious SQL fragments that are subsequently executed against the underlying database.

The vulnerability is particularly concerning because GeoTools is widely used in Geographic Information System (GIS) applications, web mapping services, and spatial data infrastructures. Organizations using GeoTools with database backends such as PostGIS, Oracle Spatial, or other JDBC-compatible databases are at risk if they process untrusted OGC Filter input.

Root Cause

The root cause of this vulnerability is improper neutralization of special elements used in SQL commands. When GeoTools converts OGC Filter expressions to SQL queries for JDBCDataStore operations, the library fails to properly sanitize or parameterize user-controlled input. This allows specially crafted filter expressions to break out of the intended query context and inject arbitrary SQL commands.

The vulnerable code path involves the filter-to-SQL translation layer, where OGC Filter operations are mapped to equivalent SQL clauses. Without proper escaping or the use of prepared statements, malicious input can manipulate the generated SQL structure.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by submitting malicious OGC Filter expressions to any application endpoint that processes filters through GeoTools' JDBCDataStore implementations. This could include WFS (Web Feature Service) endpoints, custom GIS APIs, or any service accepting OGC-compliant filter queries.

The exploitation mechanism involves crafting OGC Filter XML or CQL (Common Query Language) expressions that contain SQL injection payloads. When these expressions are parsed and executed against the database, the injected SQL commands execute with the privileges of the database connection used by the application.

For detailed technical information about the vulnerability and exploitation patterns, refer to the GitHub Security Advisory.

Detection Methods for CVE-2023-25158

Indicators of Compromise

  • Unusual or malformed OGC Filter expressions in web server logs containing SQL syntax elements
  • Database query logs showing unexpected SQL commands or injection patterns originating from GeoTools-based applications
  • Error messages indicating SQL syntax errors from spatial query processing
  • Anomalous database access patterns such as bulk data extraction or privilege escalation attempts

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns within OGC Filter requests
  • Monitor application logs for malformed or suspiciously complex OGC Filter expressions
  • Deploy database activity monitoring to detect unusual query patterns from GIS application connections
  • Use SentinelOne's application protection to identify and block SQL injection attempts at runtime

Monitoring Recommendations

  • Enable detailed logging for all OGC Filter processing in GeoTools-based applications
  • Configure database audit logging to capture all queries from application service accounts
  • Implement alerting for SQL errors or exceptions originating from spatial query components
  • Monitor for unusual data access volumes or patterns from GIS service endpoints

How to Mitigate CVE-2023-25158

Immediate Actions Required

  • Upgrade GeoTools to version 27.4 or 28.2 or later immediately
  • Audit all applications using GeoTools with JDBCDataStore implementations to identify vulnerable deployments
  • Review web application firewall and input validation controls for OGC Filter endpoints
  • Implement network segmentation to limit database access from potentially vulnerable application servers

Patch Information

The GeoTools maintainers have released patched versions that address this SQL Injection vulnerability. Users should upgrade to version 27.4 for the 27.x branch or version 28.2 for the 28.x branch. The fix can be reviewed in the GitHub commit. For complete security advisory details, see the GitHub Security Advisory GHSA-99c3-qc2q-p94m.

Workarounds

  • Disable encode functions for PostGIS DataStores to reduce the attack surface
  • Enable prepared statements for JDBCDataStores to provide parameterized query protection
  • Implement strict input validation on all OGC Filter expressions before processing
  • Restrict database user privileges to minimum required permissions for the GeoTools application
bash
# Example GeoTools datastore configuration with prepared statements enabled
# Add these properties to your datastore configuration
geotools.jdbc.preparedStatements=true
geotools.jdbc.encodeFunctions=false

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechGeotools

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability3.91%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-30220: GeoTools XXE Vulnerability

  • CVE-2024-36404: GeoTools XPath Expression RCE Vulnerability

  • CVE-2022-24818: GeoTools JNDI RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English