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.
Published: 2026-08-21
Score: 9.8 Critical
EPSS: 4.0% Low
KEV: No
Impact: SQL Injection leading to data compromise
Action: Immediate Patch
AI Analysis

Impact

GeoTools, an open‑source Java geospatial library, contains an injection flaw in the jsonArrayContains function used by the PostGIS DataStore. This is a CWE‑89 SQL injection vulnerability. When a filter expression is processed, the function writes the supplied value directly into the generated SQL without escaping, allowing an attacker to inject arbitrary SQL statements. This can enable unauthorized data reading, modification, or escalation of privileges within a PostGIS database, as the flaw resides in the core query generation used by the library.

Affected Systems

The vulnerability affects GeoTools releases starting with version 30.5 and up through versions prior to 33.6 and 34.5. Systems using those GeoTools versions together with a PostGIS 12 or newer database, and a column of type Text or JSON, are at risk. The attack requires that the GeoTools instance processes OGC filter requests that call jsonArrayContains on PostGIS data.

Risk and Exploitability

The CVSS score of 9.8 indicates a critical severity, and the EPSS score of 4% reflects the likelihood of exploitation. The flaw could be leveraged remotely through any interface that accepts OGC filters processed by GeoTools; the most likely attack vector is inferred from the description, as the vulnerability is triggered when processing filter requests. Attackers who can supply crafted jsonArrayContains arguments may gain elevated database access or exfiltrate sensitive geospatial data. The vulnerability is not listed in the CISA KEV catalog, but that absence does not diminish its exploitability.

Generated by OpenCVE AI on October 5, 2026 at 16:05 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GeoTools to the release that contains the patch – 33.6 or 34.5.
  • If upgrading is not possible, limit the privileges associated with the PostGIS connection pool used by GeoTools to prevent undue access.
  • Enable database logging and audit trails on the PostGIS instance to detect and investigate suspicious activity.

Generated by OpenCVE AI on October 5, 2026 at 16:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-mqjf-5f49-2fjh GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers
History

Thu, 27 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 21 Aug 2026 22:00:00 +0000

Type Values Removed Values Added
First Time appeared Geotools
Geotools geotools
Vendors & Products Geotools
Geotools geotools

Fri, 21 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
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.
Title GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Geotools Geotools
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-27T16:24:50.888Z

Reserved: 2026-08-19T22:43:14.891Z

Link: CVE-2026-76904

cve-icon Vulnrichment

Updated: 2026-08-27T16:15:12.911Z

cve-icon NVD

Status : Deferred

Published: 2026-08-21T21:17:06.143

Modified: 2026-10-14T19:10:00.297

Link: CVE-2026-76904

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-05T16:15:17Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')