CVE-2026-76904: Unauthenticated SQL Injection in GeoServer's jsonArrayContains Filter
GeoServer users have a direct database-security problem to resolve. CVE-2026-76904 affects the PostGIS implementation of the jsonArrayContains filter function in GeoTools, which is used by GeoServer. An unauthenticated request can reach the vulnerable SQL construction path when a published layer meets specific data-store conditions. The result is arbitrary SQL execution with the privileges of the PostGIS connection pool.
Vulnerability overview
The GeoTools advisory rates the issue Critical with a CVSS 3.1 base score of 9.8. Its metrics describe network access, low attack complexity, no required privileges, no user interaction, and high confidentiality and integrity impact. The GeoServer advisory uses a 9.1 score, but still classifies the issue as Critical. Both records identify CWE-89, improper neutralization of special elements used in SQL commands.
GeoServer published fixes on August 14, 2026, in release 3.0.1, 2.28.5, and 2.27.6. The project later reported that the flaw had been used as a zero-day before a coordinated release and that scans began within hours of public disclosure.
Where untrusted input enters SQL
The affected function accepts a column, a JSON path, and a value. In the vulnerable PostGIS implementation, the value is inserted into generated SQL without escaping. A request that can supply or influence that argument can therefore change the SQL expression that eventually reaches PostgreSQL.
GeoServer exposes OGC filtering through normal map and feature services. WFS GetFeature requests and WMS GetMap requests can carry a CQL_FILTER parameter or an XML feature filter. The vulnerable path matters only when the request uses the affected filter on a compatible PostGIS layer. That combination keeps the number of affected deployments below the total number of GeoServer installations, even though every vulnerable installation merits review.
Exploitation conditions
An attacker needs network access to a GeoServer endpoint that permits the relevant request. The layer must use PostGIS 12 or later, and the filter must target a String or JSON field. No account, prompt, or interactive action is required by the CVSS definition. The CVSS score does not prove that a particular endpoint is reachable, that a compatible layer exists, or that a request reached the database successfully.
The official advisory does not publish a complete exploit recipe, and this article does not construct one. For defenders, the important test is configuration: identify PostGIS layers with String or JSON columns, note which services expose them, and confirm whether requests with client-controlled CQL_FILTER values are accepted.
Impact
The immediate consequence is execution of arbitrary SQL expressions through the GeoServer database role. An attacker may be able to read or alter data in reachable schemas, depending on the role's grants. The same SQL channel can affect application behavior when the database account has broad rights over tables or functions used by GeoServer.
Host-level execution is a conditional escalation. The GeoServer advisory warns that grants such as pg_read_file, including rights commonly associated with a superuser account, can turn the SQL injection into remote code execution. A least-privilege PostGIS role limits that path. It does not make the SQL injection harmless, but it changes the possible blast radius.
Affected products and scope
The GeoServer advisory lists version 3.0.0 and version ranges from 2.28.0 before 2.28.5, plus releases later than 2.23.5 and before 2.27.6. Fixed GeoServer releases are 3.0.1, 2.28.5, and 2.27.6. The underlying GeoTools defect is tied to its PostGIS JDBC component, so environments that embed GeoTools outside a standard GeoServer package also need a dependency review.
Not every affected installation will be exposed. The vulnerable function must be reachable through a service and must operate on a layer that satisfies the PostGIS and column-type conditions.
Exposure context
A ZoomEye search for app="GeoServer" returned 58,835 product-fingerprint matches on November 25, 2026. A separate search for vul.cve="CVE-2026-76904" returned zero. The larger figure shows where GeoServer products are visible, not where the vulnerable code, required layer, or exploitable request path is present. The zero filter count does not prove that no vulnerable host exists.
Remediation and mitigations
Upgrade to at least GeoServer 3.0.1, 2.28.5, or 2.27.6, following the supported branch that fits the deployment. A later supported release from the same line is preferable when compatible. Replace the GeoTools PostGIS dependency in custom applications with 35.1, 34.5, or 33.6 according to the dependency line.
Until the upgrade is complete, restrict database rights for the GeoServer connection. Remove superuser access and any unnecessary file, schema, or function privileges. Limit network access to the affected services where possible. These controls reduce exposure and impact, but the vendor advisory provides no complete software workaround that leaves the vulnerable SQL construction in place.
After patching, test representative WFS and WMS requests with filters, verify that the expected database account is in use, and check that no old GeoTools JAR remains in a custom installation. Preserve the fixed build and test evidence with the change record.
Top comments (0)