Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Maven

GHSA-99c3-qc2q-p94m

CRITICAL

GeoTools OGC Filter SQL Injection Vulnerabilities

Also known asCVE-2023-25158
Published
Feb 22, 2023
Updated
Nov 8, 2023
Affected
5 pkgs
Patched
5 / 5
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
1.1%probability of exploitation in next 30 days
Lower Risk61th percentile-3.58%
0.00%1.94%3.88%5.82%0.8%1.1%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

5 pkgs affected
org.geotools:gt-jdbcorg.geotools:gt-jdbcorg.geotools:gt-jdbcorg.geotools:gt-jdbcorg.geotools:gt-jdbc

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

Impact

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:

  1. PropertyIsLike filter
    • Requires PostGIS DataStore with "encode functions" enabled
    • Or any JDBCDataStore (all relational databases) with String field (no mitigation)
  2. strEndsWith function
    • Requires PostGIS DataStore with "encode functions" enabled
  3. strStartsWith function
    • Requires PostGIS DataStore with "encode functions" enabled
  4. FeatureId filter
    • Requires JDBCDataStore (all relational databases) with prepared statements disabled and table with String primary key (Oracle not affected, SQL Server and MySQL have no settings to enabled prepared statements, PostGIS does)
  5. jsonArrayContains function
    • Requires PostGIS and Oracle DataStore with String or JSON field
  6. DWithin filter
    • Happens only in Oracle DataStore, no mitigation

Patches

  • GeoTools 28.2
  • GeoTools 27.4
  • GeoTools 26.7
  • GeoTools 25.7
  • GeoTools 24.7

Workarounds

Partial mitigation:

  • In PostGIS DataStore disable "encode functions"
  • In any PostGIS enable "prepared statements" (only database with such settings)
        Map<String, Object> params = new HashMap<>();
        params.put("dbtype", "postgis");
        params.put("host", "localhost");
        params.put("port", 5432);
        params.put("schema", "public");
        params.put("database", "database");
        params.put("user", "postgres");
        params.put("passwd", "postgres");
        params.put("preparedStatements", true ); // mitigation
        params.put("encode functions", false ); // mitigation

        DataStore dataStore = DataStoreFinder.getDataStore(params);

References

Affected Packages

5 total 5 fixed
EcosystemPackageVulnerable rangeFix
Mavenorg.geotools:gt-jdbc28.0&&< 28.228.2
Mavenorg.geotools:gt-jdbc27.0&&< 27.427.4
Mavenorg.geotools:gt-jdbc26.0&&< 26.726.7
Mavenorg.geotools:gt-jdbc25.0&&< 25.725.7
Mavenorg.geotools:gt-jdbcall versions24.7

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.geotools:gt-jdbc. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update org.geotools:gt-jdbc to 28.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-99c3-qc2q-p94m is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-99c3-qc2q-p94m is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-99c3-qc2q-p94m. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact 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: 1. ``PropertyIsLike`` filter * Requires PostGIS DataStore with "encode functions" enabled * Or any JDBCDataStore (all relational databases) with String field (no mitigation) 3. ``strEndsWith`` function * Requires PostGIS DataStore with "encode functions" enabled 5. ``strStartsWith`` function * Requires PostGIS DataStore with "encode functio
O3 Security · Impact-Aware SCA

Is GHSA-99c3-qc2q-p94m in your dependencies?

O3 detects GHSA-99c3-qc2q-p94m across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-99c3-qc2q-p94m: GeoTools OGC Filter SQL Injection Vulnerab… | O3 Security