Patchfirst
CVE-2026-76904 Public exploit Critical · 9.8 EPSS 4.0%

GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers

Fix:upgrade gt-jdbc-postgis to 35.1 or later Details ↓

geotools · geotools

Summary

The flaw is an SQL injection in the jsonArrayContains filter function of GeoTools, an open source Java geospatial library, affecting its PostGIS DataStore implementation. An unauthenticated remote attacker can reach it over the network with no user interaction when the application runs OGC Filters against PostGIS layers with PostGIS 12 or greater and a String or JSON field, because the value passed to jsonArrayContains is written into generated SQL without escaping.

Official description · CVE.org

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.

Breakdown
70.0 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited the day it was disclosed. Public exploit code (PoC-in-GitHub) was available 5 days before disclosure.

  1. Public exploit codePoC-in-GitHub5 days before
  2. DisclosedFirst seen exploitedVulnCheck KEV evidenceday 0

2 related vulnerabilities in the same code over 3 years.

Linked vulnerabilitiesLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2023-25158Unfiltered SQL Injection in Geotools21 Feb 2023
  2. relatedMedium

    Why these are linked:

    • Same code patched: FilterToSqlHelper.java (machine-matched)commit 64fb4c4commit d821c4d
    • Similar weakness in the same product (machine-matched)same product + CWE + description similarity
    This CVECVE-2026-76904GeoTools has unauthenticated SQL injection in the…21 Aug 2026

Affected versions and fixes

as published in the CVE record

geotools geotools

Affected: = 35.0 · >= 34.0, < 34.5 · >= 30.5, < 33.6

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: org.geotools.jdbc:gt-jdbc-postgis.

Mavenorg.geotools.jdbc:gt-jdbc-postgisGHSA-mqjf-5f49-2fjh

Upgrade to 35.1 or later

Set the version to 35.1 or later in your pom.xml or build.gradle.

The first fix for CVE-2026-76904. No other CVE tracked by Patchfirst affects this package.

Affected versions, by release line

If you runUpgrade to
35.0 up to 35.135.1
34.0 up to 34.534.5
30.5 up to 33.633.6

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

9 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close