{"id":"CVE-2026-76904","aliases":["EUVD-2026-64133","GHSA-mqjf-5f49-2fjh"],"status":"published","title":"GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers","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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.03976,"percentile":0.90619,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-89"],"published":"2026-08-21T20:13:20Z","modified":"2026-11-04T02:47:54Z","exploits":[{"source":"pocgithub","id":"YonLiud/CVE-2026-76904","title":"YonLiud/CVE-2026-76904","date":"2026-08-16","url":"https://github.com/YonLiud/CVE-2026-76904"},{"source":"pocgithub","id":"bickZero93/CVE-2026-76904","title":"bickZero93/CVE-2026-76904","date":"2026-08-26","url":"https://github.com/bickZero93/CVE-2026-76904"},{"source":"nuclei","id":"CVE-2026-76904","title":"GeoServer jsonArrayContains CQL Filter - SQL Injection","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-76904.yaml"}],"fixes":[{"ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","fixed_in":["35.1","34.5","33.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"35.0"},{"last_affected":"35.0"},{"fixed":"35.1"}]}],"versions":["35.0"]},{"source":"ghsa","ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"34.0"},{"fixed":"34.5"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"30.5"},{"fixed":"33.6"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"35.0"},{"fixed":"35.1"}]}],"versions":["35.0"]},{"source":"osv","ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"34.0"},{"fixed":"34.5"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"30.5"},{"fixed":"33.6"}]}]}],"products":[{"vendor":"geotools","product":"geotools"}],"references":[{"url":"https://github.com/geotools/geotools/security/advisories/GHSA-mqjf-5f49-2fjh","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/geotools/geotools/pull/5829","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/geotools/geotools/releases/tag/33.6","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/geotools/geotools/releases/tag/34.5","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/geotools/geotools/releases/tag/35.1","tags":["x_refsource_MISC","web"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7589","tags":["x_refsource_MISC","web"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7958","tags":["x_refsource_MISC","web"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7959","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-mqjf-5f49-2fjh"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76904.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-76904","tags":["advisory"]},{"url":"https://github.com/geotools/geotools","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-76904","title":"GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers","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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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.","status":"published","published":"2026-08-21T20:13:20.536Z","modified":"2026-08-27T16:24:50.888Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T13:46:21.568011Z"}],"euvd":[{"id":"EUVD-2026-64133","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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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.","status":"published","published":"2026-08-21T20:13:20Z","modified":"2026-08-27T16:24:50Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T18:01:27.663452Z"}],"ghsa":[{"id":"GHSA-mqjf-5f49-2fjh","title":"GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers","description":"### 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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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","status":"published","published":"2026-08-21T20:25:41Z","modified":"2026-08-21T20:26:30Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:41:04.755504Z"}],"nvd":[{"id":"CVE-2026-76904","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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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.","status":"published","published":"2026-08-21T21:17:06.143Z","modified":"2026-10-14T19:10:00.297Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:12:40.665005Z"}],"osv":[{"id":"CVE-2026-76904","title":"GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers","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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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.","status":"published","published":"2026-08-21T20:13:20.536Z","modified":"2026-11-11T07:24:43.165498181Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-11T03:21:13.886027Z"},{"id":"GHSA-mqjf-5f49-2fjh","title":"GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers","description":"### 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(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` 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","status":"published","published":"2026-08-21T20:25:41Z","modified":"2026-08-21T20:40:58.371279Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:52.170928Z"}]}}
