A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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 SQL Injection Vulnerability

CVE-2023-25158 is a SQL injection vulnerability in GeoTools Java library affecting OGC Filter execution with JDBCDataStore. This article covers the technical details, affected versions, security impact, and mitigation.

Updated: May 15, 2026

CVE-2023-25158 Overview

CVE-2023-25158 is a SQL injection vulnerability in GeoTools, an open source Java library for geospatial data processing. The flaw affects the library's Open Geospatial Consortium (OGC) Filter expression language parser when filters execute against JDBCDataStore implementations. Attackers can inject arbitrary SQL through crafted OGC Filter expressions, allowing unauthenticated remote exploitation against any application that exposes GeoTools filter evaluation to user input. The vulnerability is tracked as [CWE-89: SQL Injection] and affects downstream products such as GeoServer that embed GeoTools. The maintainers released fixed versions 27.4 and 28.2 to address the issue.

Critical Impact

Unauthenticated attackers can execute arbitrary SQL statements against backend databases, leading to data theft, data modification, and full database compromise.

Affected Products

  • GeoTools versions prior to 27.4 (27.x branch)
  • GeoTools versions prior to 28.2 (28.x branch)
  • Applications embedding vulnerable GeoTools releases, including GeoServer deployments using JDBCDataStore

Discovery Timeline

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

Technical Details for CVE-2023-25158

Vulnerability Analysis

GeoTools provides parsing, encoding, and execution support for OGC Filter expressions. These filters can be supplied through standards-based interfaces such as Web Feature Service (WFS) GetFeature requests. When the library translates filter expressions into SQL for execution against a JDBCDataStore, certain function arguments and property names are concatenated into the generated SQL without proper parameterization.

An attacker can craft an OGC Filter that abuses encoded functions to break out of the expected SQL context. The injected payload runs with the privileges of the database account configured for the data store. Impact includes reading arbitrary tables, modifying data, and in some database engines achieving command execution through database-specific features.

Root Cause

The root cause is improper neutralization of special elements used in an SQL command [CWE-89]. The encode functions code path for PostGIS and similar JDBC stores assembled SQL fragments via string concatenation rather than binding parameters through prepared statements. Filter inputs derived from network requests reached the SQL generator without sanitization.

Attack Vector

Exploitation requires only network access to an endpoint that evaluates OGC Filters against a JDBC-backed data store. No authentication or user interaction is required. The attacker submits a malicious filter expression — for example, through a WFS request — containing function arguments that terminate the intended SQL clause and append attacker-controlled statements. The vulnerability is described in the GitHub Security Advisory GHSA-99c3-qc2q-p94m and fixed by the GitHub commit 64fb4c4. No verified public proof-of-concept code is referenced in the source data, so technical specifics are described in prose rather than reproduced here.

Detection Methods for CVE-2023-25158

Indicators of Compromise

  • WFS or OGC API requests containing SQL metacharacters such as single quotes, semicolons, or comment sequences within filter, propertyName, or function-argument parameters.
  • Database audit log entries showing unexpected UNION, SELECT, or DDL statements originating from the application's database account.
  • Outbound network connections or DNS lookups initiated by the database server, which can indicate out-of-band exfiltration through injected SQL.
  • HTTP 500 responses from GeoTools or GeoServer endpoints correlated with malformed filter expressions.

Detection Strategies

  • Inspect HTTP request bodies and query strings sent to GeoServer or other GeoTools-based services for OGC Filter payloads containing SQL keywords.
  • Enable database query logging and alert on statements that reference system catalogs (pg_catalog, information_schema) from the GeoTools application identity.
  • Run software composition analysis (SCA) against application dependencies to flag geotools:geotools versions below 27.4 or 28.2.

Monitoring Recommendations

  • Forward web application and database logs to a centralized analytics platform for correlation between filter requests and database activity.
  • Baseline normal OGC Filter request patterns and alert on deviations such as unusually long filters or non-spatial function calls.
  • Track changes to authentication tables, user roles, and schema objects in databases reachable from GeoTools data stores.

How to Mitigate CVE-2023-25158

Immediate Actions Required

  • Upgrade GeoTools to version 27.4, 28.2, or later across all deployed applications and dependent products such as GeoServer.
  • Inventory all internal and internet-facing services that embed GeoTools and prioritize remediation for network-exposed instances.
  • Restrict the database account used by JDBCDataStore to the minimum privileges required, removing DDL and superuser rights.

Patch Information

The GeoTools maintainers fixed the vulnerability in releases 27.4 and 28.2. The corrective change is documented in the GeoTools commit 64fb4c4 and the GHSA-99c3-qc2q-p94m advisory. Operators of downstream products should consult their vendor's release notes to identify the first patched build.

Workarounds

  • Disable encode functions for PostGIS data stores in environments that cannot upgrade immediately.
  • Enable prepared statements for JDBCDataStore configurations as a partial mitigation against injection.
  • Place a web application firewall rule in front of GeoServer or similar services to reject OGC Filter parameters containing SQL metacharacters.
  • Network-segment the database backing the data store so that exploitation cannot pivot to additional internal systems.
bash
# Example: enable prepared statements for a GeoServer JDBCDataStore
# in the data store configuration XML
<entry key="preparedStatements">true</entry>
<entry key="encode functions">false</entry>

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.83%

  • 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 GHSA-99c3-qc2q-p94m
  • Related CVEs
  • CVE-2025-30220: GeoTools XXE Vulnerability

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

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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