{"id":"CVE-2026-76904","aliases":["CVE-2026-76904","GHSA-mqjf-5f49-2fjh"],"related":[],"kind":"vulnerability","state":"published","title":"GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"GeoTools es una biblioteca Java de código abierto que proporciona herramientas para datos geoespaciales. A partir de la versión 30.5 y antes de las versiones 33.6, 34.5 y 33.6, existe una vulnerabilidad de inyección SQL al ejecutar filtros OGC con la implementación de PostGIS DataStore: función 'jsonArrayContains'; Requiere PostGIS 12 o superior con un campo de tipo String o JSON. Para PostGIS 12 y superior, la función 'jsonArrayContains(<column>, <pointer>, <value>)' escribe '<value>' en el SQL generado sin escapar. Los parches están disponibles en las versiones 33.6, 34.5 y 33.6. No se conoce ninguna solución alternativa disponible. Para limitar el alcance de la inyección SQL, el pool de conexiones de PostGIS debe configurarse con derechos limitados.","source":"nvd"}],"published":"2026-08-21T20:13:20.536Z","modified":"2026-11-30T19:11:06.747Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"= 35.0","status":"affected"},{"version":">= 34.0, < 34.5","status":"affected"},{"version":">= 30.5, < 33.6","status":"affected"}],"vendor":"geotools","product":"geotools","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"35.0","status":"affected","fixed":"35.1"}],"ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","purl":"pkg:maven/org.geotools.jdbc/gt-jdbc-postgis","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"34.0","status":"affected","fixed":"34.5"}],"ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","purl":"pkg:maven/org.geotools.jdbc/gt-jdbc-postgis","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"30.5","status":"affected","fixed":"33.6"}],"ecosystem":"Maven","package":"org.geotools.jdbc:gt-jdbc-postgis","purl":"pkg:maven/org.geotools.jdbc/gt-jdbc-postgis","source":"ghsa"}],"references":[{"url":"https://github.com/geotools/geotools/security/advisories/GHSA-mqjf-5f49-2fjh","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/geotools/geotools/pull/5829","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/geotools/geotools/releases/tag/33.6","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/geotools/geotools/releases/tag/34.5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/geotools/geotools/releases/tag/35.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7589","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7958","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://osgeo-org.atlassian.net/browse/GEOT-7959","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/geotools/geotools","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-08-25T03:56:51.618Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-76904","url":"https://www.cve.org/CVERecord?id=CVE-2026-76904","licence":"CVE Terms of Use","modified":"2026-08-27T16:24:50.888Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mqjf-5f49-2fjh","url":"https://github.com/advisories/GHSA-mqjf-5f49-2fjh","licence":"CC-BY-4.0","modified":"2026-08-21T20:40:58.371Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-76904","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-76904","licence":"Public domain","modified":"2026-11-30T19:11:06.747Z"}],"updatedAt":"2026-11-30T19:17:34.369Z","epss":{"score":0.29775,"percentile":0.98232,"date":"2026-12-01T12:00:22.000Z"}}