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: 1.8% 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. 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, 34.5, and 35.1. 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 2% reflects the likelihood of exploitation. The flaw can be leveraged remotely via any HTTP or other interface that accepts OGC filters handled by GeoTools, and it can persist in a database setting, making it a persistent threat. The vulnerability is not listed in the CISA KEV catalog, but the absence of a KEV status does not diminish its exploitability. Attackers who can supply crafted JSONArrayContains arguments may gain elevated database access or exfiltrate sensitive geospatial data.

Generated by OpenCVE AI on August 26, 2026 at 14:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

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

Generated by OpenCVE AI on August 26, 2026 at 14:45 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-09-09T21:06:39.057

Link: CVE-2026-76904

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-26T14:45:04Z

Weaknesses
  • CWE-89

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