Vulnerabilities in pkg:maven/org.geotools.jdbc/gt-jdbc-postgis

PACKAGE
Advisory Identifier: GHSA-mqjf-5f49-2fjh
Advisory Summary

CVE-2026-76904 is a CRITICAL (CVSS 9.8) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Gt jdbc postgis libraries in the Maven ecosystem. The issue involves geotools has unauthenticated sql injection in the jsonarraycontains filter function against postgis layers. Remediation is available by upgrading affected packages to version 35.1, 34.5, 33.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.geotools.jdbc/gt-jdbc-postgis

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.geotools.jdbc/gt-jdbc-postgis. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mqjf-5f49-2fjh CVE-2026-76904 CRITICAL GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers

CVE-2026-76904 at a Glance

CVE Identifier CVE-2026-76904
GHSA Identifier GHSA-mqjf-5f49-2fjh
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Gt jdbc postgis
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-76904

To remediate this vulnerability, upgrade all affected Gt jdbc postgis dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.geotools.jdbc:gt-jdbc-postgis fixed: 35.1
<dependency>
    <groupId>org.geotools.jdbc</groupId>
    <artifactId>gt-jdbc-postgis</artifactId>
    <version>35.1</version>
</dependency>
org.geotools.jdbc:gt-jdbc-postgis fixed: 34.5
<dependency>
    <groupId>org.geotools.jdbc</groupId>
    <artifactId>gt-jdbc-postgis</artifactId>
    <version>34.5</version>
</dependency>
org.geotools.jdbc:gt-jdbc-postgis fixed: 33.6
<dependency>
    <groupId>org.geotools.jdbc</groupId>
    <artifactId>gt-jdbc-postgis</artifactId>
    <version>33.6</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.geotools.jdbc

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-76904, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.geotools.jdbc

Analyze the terminal output to locate any version of Gt jdbc postgis in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 35.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.geotools.jdbc command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Gt jdbc postgis, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary An SQL Injection Vulnerability has been found when executing OGC Filters with PostGIS DataStore implementation: * `jsonArrayContains` function Requires PostGIS 12 or greater with a String or JSON field For PostGIS 12 and greater `jsonArrayContains(<column>, <pointer>, <value>)` function writes `<value>` into generated SQL without escaping. ### Patches * GeoTools 35.1 * GeoTools 33.5 * GeoTools 34.4 ### Mitigation No mitigation is available: * To limit scope of SQL Injection the PostGIS connection pool should be configured with limited rights. ### Impact This vulnerability can lead to execution of arbitrary SQL expressions in the database. ### References * https://osgeo-org.atlassian.net/browse/GEOT-7958 * https://osgeo-org.atlassian.net/browse/GEOT-7959 * https://github.com/geotools/geotools/pull/5829 * https://osgeo-org.atlassian.net/browse/GEOT-7589

CVE-2026-76904 Affected Gt jdbc postgis Versions

3 component(s)
Fixed Versions:
35.134.533.6
Product / Package Ecosystem Affected Versions Fixed Version
org.geotools.jdbc:gt-jdbc-postgis
Maven
≥ 35.0
< 35.1
All 1 versions
35.0
35.1
org.geotools.jdbc:gt-jdbc-postgis
Maven
≥ 34.0
< 34.5
34.5
org.geotools.jdbc:gt-jdbc-postgis
Maven
≥ 30.5
< 33.6
33.6

References

Frequently Asked Questions

What is CVE-2026-76904?
CVE-2026-76904 is a security vulnerability in Gt jdbc postgis involving GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Gt jdbc postgis versions are affected?
Affected versions include releases prior to 35.1, 34.5, 33.6 across affected packages: org.geotools.jdbc:gt-jdbc-postgis.
What version fixes CVE-2026-76904?
Upgrading to 35.1, 34.5, 33.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gt-jdbc-postgis affected?
Yes, org.geotools.jdbc:gt-jdbc-postgis is affected in releases prior to 35.1, 34.5, 33.6. Upgrade your dependency to 35.1, 34.5, 33.6 or later.
What is the CVSS score of CVE-2026-76904?
CVE-2026-76904 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-76904?
CVE-2026-76904 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Maven dependencies for CVE-2026-76904?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.geotools.jdbc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mqjf-5f49-2fjh",
  "modified" : "2026-08-21T20:26:29Z",
  "published" : "2026-08-21T20:25:41Z",
  "aliases" : [ "CVE-2026-76904" ],
  "summary" : "GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers",
  "details" : "### Summary\n\nAn SQL Injection Vulnerability has been found when executing OGC Filters with PostGIS DataStore implementation:\n\n* `jsonArrayContains` function  \n    Requires PostGIS 12 or greater with a String or JSON field\n\nFor PostGIS 12 and greater `jsonArrayContains(<column>, <pointer>, <value>)` function writes `<value>` into generated SQL without escaping.\n\n### Patches\n\n* GeoTools 35.1\n* GeoTools 33.5\n* GeoTools 34.4\n\n### Mitigation\n\nNo mitigation is available:\n\n* To limit scope of SQL Injection the PostGIS connection pool should be configured with limited rights.\n\n### Impact\n\nThis vulnerability can lead to execution of arbitrary SQL expressions in the database.\n\n### References\n\n* https://osgeo-org.atlassian.net/browse/GEOT-7958\n* https://osgeo-org.atlassian.net/browse/GEOT-7959\n* https://github.com/geotools/geotools/pull/5829\n* https://osgeo-org.atlassian.net/browse/GEOT-7589",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geotools.jdbc:gt-jdbc-postgis"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "35.0"
      }, {
        "fixed" : "35.1"
      } ]
    } ],
    "versions" : [ "35.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geotools.jdbc:gt-jdbc-postgis"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "34.0"
      }, {
        "fixed" : "34.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.geotools.jdbc:gt-jdbc-postgis"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "30.5"
      }, {
        "fixed" : "33.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/geotools/geotools/security/advisories/GHSA-mqjf-5f49-2fjh"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/geotools/geotools/pull/5829"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/geotools/geotools"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/geotools/geotools/releases/tag/33.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/geotools/geotools/releases/tag/34.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/geotools/geotools/releases/tag/35.1"
  }, {
    "type" : "WEB",
    "url" : "https://osgeo-org.atlassian.net/browse/GEOT-7589"
  }, {
    "type" : "WEB",
    "url" : "https://osgeo-org.atlassian.net/browse/GEOT-7958"
  }, {
    "type" : "WEB",
    "url" : "https://osgeo-org.atlassian.net/browse/GEOT-7959"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-21T20:25:41Z",
    "nvd_published_at" : null
  }
}