CVE-2026-76904: Gt jdbc postgis SQL Injection Vulnerability
CRITICALCVE-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.
CVE-2026-76904 at a Glance
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).
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.
<dependency>
<groupId>org.geotools.jdbc</groupId>
<artifactId>gt-jdbc-postgis</artifactId>
<version>35.1</version>
</dependency>
<dependency>
<groupId>org.geotools.jdbc</groupId>
<artifactId>gt-jdbc-postgis</artifactId>
<version>34.5</version>
</dependency>
<dependency>
<groupId>org.geotools.jdbc</groupId>
<artifactId>gt-jdbc-postgis</artifactId>
<version>33.6</version>
</dependency>
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
CVE-2026-76904 Affected Gt jdbc postgis Versions
3 component(s)| 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?
Which Gt jdbc postgis versions are affected?
What version fixes CVE-2026-76904?
Is gt-jdbc-postgis affected?
What is the CVSS score of CVE-2026-76904?
What CWE is associated with CVE-2026-76904?
How can I check Maven dependencies for CVE-2026-76904?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}