CVE-2026-76904

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

Published Aug 21, 2026 CVSS 3.1 · 9.8 Critical EPSS 4.0% KEV · Not listed
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.

Analysis

AI-generated

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

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
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Geotools
Geotools geotools
Vendors & Products Geotools
Geotools geotools
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'}

Weaknesses
  • CWE-89

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 27, 2026, 4:24 PM
Reserved
Aug 19, 2026, 10:43 PM
Status
Deferred
Published
Aug 21, 2026, 9:17 PM
Modified
Oct 14, 2026, 7:10 PM