CVE-2026-76904

Source
https://cve.org/CVERecord?id=CVE-2026-76904
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-76904.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-76904
Aliases
Published
2026-08-21T20:13:20.536Z
Modified
2026-08-27T19:14:11.729680Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-89"
    ],
    "unresolved_ranges": [
        {
            "source": "AFFECTED_FIELD",
            "extracted_events": [
                {
                    "introduced": "= 35.0"
                },
                {
                    "last_affected": "= 35.0"
                },
                {
                    "introduced": "34.0"
                },
                {
                    "fixed": "34.5"
                },
                {
                    "introduced": "30.5"
                },
                {
                    "fixed": "33.6"
                }
            ]
        }
    ],
    "cna_assigner": "GitHub_M",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76904.json"
}
References

Affected packages

Git / github.com/geotools/geotools

Affected ranges

Type
GIT
Repo
https://github.com/geotools/geotools
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "source": "REFERENCES"
}

Affected versions

21.*
21.6b
26.*
26.1a
26.1b

Database specific

vanir_signatures_modified
"2026-08-27T19:14:11Z"
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-76904.json"
vanir_signatures
[
    {
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 407.0,
            "function_hash": "219968708870028777725988234334950752236"
        },
        "id": "CVE-2026-76904-1bfc876f",
        "source": "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176",
        "target": {
            "function": "testFunctionJsonArrayContainsEscapingExpectedJsonPathExists",
            "file": "modules/plugin/jdbc/jdbc-postgis/src/test/java/org/geotools/data/postgis/PostgisJsonPathExistsTest.java"
        }
    },
    {
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 510.0,
            "function_hash": "3681059007404221963985383358675199465"
        },
        "id": "CVE-2026-76904-5ed3fe5d",
        "source": "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176",
        "target": {
            "function": "constructEquality",
            "file": "modules/plugin/jdbc/jdbc-postgis/src/main/java/org/geotools/data/postgis/FilterToSqlHelper.java"
        }
    },
    {
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 401.0,
            "function_hash": "310537525168186007865347830206679491199"
        },
        "id": "CVE-2026-76904-5ff857fb",
        "source": "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176",
        "target": {
            "function": "testFunctionJsonArrayContainsJsonPathExists",
            "file": "modules/plugin/jdbc/jdbc-postgis/src/test/java/org/geotools/data/postgis/PostgisJsonPathExistsTest.java"
        }
    },
    {
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "238215181184688762607341091260393890655",
                "142162717035496660613843501515089864172",
                "306573939849757369731165941132523654309",
                "99839146028169368545874148254270763085"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-76904-8a1bc057",
        "source": "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176",
        "target": {
            "file": "modules/plugin/jdbc/jdbc-postgis/src/main/java/org/geotools/data/postgis/FilterToSqlHelper.java"
        }
    },
    {
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "235456587744061354359431653741380968343",
                "12643701607721801373032299883989837517",
                "189719138756431481204095971602523522437",
                "182320730038654461447263317218346791638",
                "54795313134437193839962836670423973185",
                "136859883612649158510730258621538496393",
                "59434920587959872663117044931596471893"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-76904-d2788304",
        "source": "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176",
        "target": {
            "file": "modules/plugin/jdbc/jdbc-postgis/src/test/java/org/geotools/data/postgis/PostgisJsonPathExistsTest.java"
        }
    }
]