How CVE-2026-76904 Reaches PostGIS Through GeoServer OGC Filters
The important question for defenders is not only whether GeoServer is installed. It is whether an internet-facing request can carry a filter into the vulnerable PostGIS code. CVE-2026-76904 affects the jsonArrayContains function in GeoTools, and GeoServer can expose that function through ordinary OGC map and feature requests.
Request path and vulnerability
GeoServer uses OGC filters for WFS GetFeature and WMS GetMap. The filter can arrive as CQL_FILTER or as an XML <fes:Filter> element. When the filter invokes jsonArrayContains against a PostGIS layer, the backend translates the operation into SQL.
The advisory says the third argument, the value compared with the JSON array, is written into generated SQL without escaping. A crafted value can change the SQL statement. The defect is in the GeoTools PostGIS data-store implementation, not in the PostgreSQL JSON parser alone. A valid JSON array operation may still be the visible application feature even when the generated SQL has been altered.
Prerequisites that narrow the population
Three conditions have to meet. First, the deployed GeoServer or embedded GeoTools version must be affected. Second, the published layer must use PostGIS 12 or later and include a String or JSON field that can be targeted by the filter. Third, a reachable service must accept a request that uses the vulnerable filter.
The CVSS vector assumes network access without credentials or user interaction. Operational exposure can be lower when a service is inside a private network, requires a gateway, or publishes only layers without the needed field. A product fingerprint cannot establish those conditions.
What the attacker can influence
The vulnerable value is part of the filter expression. This makes the issue different from an ordinary database input leak where an application parameter reaches a prepared statement. The generated filter is the boundary that fails to preserve the value as data.
The public advisory describes the coding error and does not provide a complete malicious request. Defenders should focus on whether their deployed service accepts client-controlled filtering at all. They do not need a working payload to locate the vulnerable code path.
Consequences in PostGIS
SQL expression injection can expose rows, alter records, call database functions, or change objects allowed by the connection role. If the role has administrative or file-read functions, the impact can extend beyond the intended application schema. The GeoServer advisory specifically calls out pg_read_file and superuser-style grants as conditions that can turn database execution into host-level remote code execution.
That escalation is not automatic. A restricted role can still lose confidentiality or integrity inside its permitted schemas, while a role that cannot read files or execute dangerous functions limits the host attack surface.
Version review
The affected GeoServer range includes 3.0.0, 2.28.0 through 2.28.4, and versions later than 2.23.5 and earlier than 2.27.6. Fixed releases are 3.0.1, 2.28.5, and 2.27.6. Deployments that package GeoTools directly should compare their PostGIS JDBC component with the fixed GeoTools versions 35.1, 34.5, and 33.6.
Measurement and uncertainty
On November 25, 2026, ZoomEye returned 58,835 matches for app="GeoServer". A CVE-specific query for vul.cve="CVE-2026-76904" returned zero. Those results describe a visible product population and an indexed CVE tag, not the number of exploitable layers. Treat the larger count as an inventory prompt, then verify versions, services, layers, and database roles directly.
Decision path
Inventory every GeoServer instance and custom GeoTools application. Mark those that expose WFS or WMS to untrusted networks. For each, identify PostGIS layers with String or JSON fields and record the database role used by the pool.
Upgrade to a fixed release, or to a later supported release when tested. In parallel, remove unnecessary database rights. If immediate patching is not possible, place the services behind controls that reject untrusted filter operations. After the change, retest a CQL filter and an XML filter against a representative layer, then confirm the service is using the intended database account.
Top comments (0)