Description
GeoTools is an open source Java library that provides tools for geospatial data. Starting in version 30.5 and prior to versions 33.6, 34.5, and 33.6, an SQL Injection Vulnerability is present 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 are available in versions 33.6, 34.5, and 33.6. No known workaround is available. To limit scope of SQL Injection the PostGIS connection pool should be configured with limited rights.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| geotools | geotools | = 35.0, >= 34.0, < 34.5, >= 30.5, < 33.6 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
YonLiud/CVE-2026-76904 ★ 6 · Aug 16, 2026
One-Day POC | GeoServer Unauthenticated SQL injection to complete RCE
-
bickZero93/CVE-2026-76904 ★ 1 · Aug 26, 2026
PostGIS SQL Injection GeoTools
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- GeoServer jsonArrayContains CQL Filter - SQL Injection http/cves/2026/CVE-2026-76904.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.geotools.jdbc:gt-jdbc-postgis | >= 35.0, < 35.1 | 35.1 | GHSA-mqjf-5f49-2fjh |
| Maven | org.geotools.jdbc:gt-jdbc-postgis | >= 34.0, < 34.5 | 34.5 | GHSA-mqjf-5f49-2fjh |
| Maven | org.geotools.jdbc:gt-jdbc-postgis | >= 30.5, < 33.6 | 33.6 | GHSA-mqjf-5f49-2fjh |
Advisories 1
- WID-SEC-2026-2886 GeoServer: Schwachstelle ermöglicht SQL-Injection und potenziell Codeausführung BSI CERT-Bund (WID) · Aug 24, 2026
References
- https://github.com/geotools/geotools/security/advisories/GHSA-mqjf-5f49-2fjh
- https://github.com/geotools/geotools/pull/5829
- https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176
- https://github.com/geotools/geotools/releases/tag/33.6
- https://github.com/geotools/geotools/releases/tag/34.5
- https://github.com/geotools/geotools/releases/tag/35.1
- https://osgeo-org.atlassian.net/browse/GEOT-7589
- https://osgeo-org.atlassian.net/browse/GEOT-7958
- https://osgeo-org.atlassian.net/browse/GEOT-7959