CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-76904

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

Alon Barad
Alon Barad
Software Engineer

Aug 22, 2026·5 min read·4 visits

Executive Summary (TL;DR)

An unauthenticated SQL injection vulnerability in the GeoTools `jsonArrayContains` OGC filter function allows remote attackers to execute arbitrary database commands and potentially achieve remote code execution by exploiting unsanitized input parsing in PostGIS database queries.

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Vulnerability Overview

The GeoTools open-source Java library provides standard-compliant methods for manipulating geospatial data. The library's gt-jdbc-postgis module allows client applications to connect to PostgreSQL/PostGIS database backends. When users submit spatial queries through Web Feature Service (WFS) or Web Map Service (WMS) endpoints, GeoTools translates high-level OGC Filter expressions into native database queries.

The vulnerability is located within the implementation of the jsonArrayContains filter function, designed to facilitate native querying of JSON or string array structures on modern PostgreSQL backends. Because this function exposes an attack surface that translates user-supplied parameters into database execution parameters, lack of rigorous boundary isolation within the query-generation module results in a SQL injection vulnerability.

This security weakness is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). The consequences of successful exploitation range from unauthorized access to sensitive database schemas to total system compromise on the database server if the connection pool operates with high privilege levels.

Root Cause Analysis

To support JSON query operations, GeoTools uses PostgreSQL's SQL/JSON path engine, introduced natively in PostgreSQL 12. The underlying database engine processes path evaluations using the jsonb_path_exists function, which expects its arguments as format strings or parameters. The dynamic compilation of this function occurs in modules/plugin/jdbc/jdbc-postgis/src/main/java/org/geotools/data/postgis/FilterToSqlHelper.java.

The specific point of failure resides in the constructEquality method, which is responsible for building the key-value comparison string within the generated JSON path expression. Instead of utilizing parameterized query interfaces or sanitizing the input characters, the GeoTools translation engine formats the expression dynamically using Java's String.formatted framework.

When the compiler processes the string literal argument, it incorporates the user input directly into the comparison query template: (@.%s == "%s"). Because the library does not execute escaping or character substitution before formatting, input data that contains unescaped single or double quotes breaks out of the string context. This allows an attacker to manipulate the boundary of the query, resulting in arbitrary SQL command execution within the database engine.

Code Analysis

The vulnerable implementation in FilterToSqlHelper.java accepts the target array and value parameters to generate the query comparison string:

// Vulnerable Code Path in FilterToSqlHelper.java
private String constructEquality(String[] jsonPath, Expression expected) {
    // ... evaluation logic ...
    } else if (value instanceof Double double1) {
        return "(@.%s == %f)".formatted(jsonPath[lastIndex], double1);
    }
    // Vulnerability: Direct string formatting without escaping
    return "(@.%s == \"%s\")".formatted(jsonPath[lastIndex], value);
}

The patched version introduces string preprocessing to properly escape characters that could alter the semantic structure of the generated SQL/JSON instruction:

// Patched Code Path with escapeJsonLiteral Integration
private String constructEquality(String[] jsonPath, Expression expected) {
    // ... evaluation logic ...
    } else if (value instanceof Double double1) {
        return "(@.%s == %f)".formatted(jsonPath[lastIndex], double1);
    }
    // Remediation: Escaping characters using escapeJsonLiteral
    String literal = escapeJsonLiteral(String.valueOf(value));
    return "(@.%s == \"%s\")".formatted(jsonPath[lastIndex], literal);
}

The vulnerability is fully addressed because the escapeJsonLiteral method converts double quotes (") to escaped format strings (\") to neutralize the JSON path boundary break. Simultaneously, single quotes (') are doubled ('') to ensure the outer SQL query engine does not evaluate user input as a query delimiter, maintaining structural integrity across both the SQL and JSON parsers.

Exploitation Methodology

An attacker can exploit this vulnerability by submitting a maliciously constructed ECQL filter string via standard OGC WFS or WMS protocols. Exploitation does not require authentication or user interaction.

To construct an exploit, the attacker crafts a request using the jsonArrayContains function, passing a SQL comment or boolean evaluation statement inside the value field. The payload uses nested quote boundaries to escape the JSON query parameters. For example, the attacker can pass a payload containing SQL statements like payload" OR (SELECT 1 FROM pg_sleep(5)) IS NOT NULL --.

When GeoTools compiles the OGC request, the PostGIS dialect helper translates the filter into SQL format:

SELECT * FROM target_table WHERE jsonb_path_exists(column::jsonb, '$ ? (@.property == "payload" OR (SELECT 1 FROM pg_sleep(5)) IS NOT NULL --")')

During execution, the PostgreSQL server evaluates the outer SQL query logic, parsing the sleep command directly. A successful delay of execution demonstrates blind SQL injection capability, allowing the attacker to construct automation scripts to extract data, download configuration files, or interact with database services.

Impact Assessment

The impact of this SQL injection vulnerability is classified as critical. It exposes the application infrastructure to unauthorized data retrieval, system modifications, and full backend database takeover.

Attackers can exfiltrate sensitive data, including administrative credentials and proprietary geospatial datasets, by extracting schema records through automated SQL blind techniques. If the database schema has write permissions, attackers can perform database modification attacks, altering spatial geometries, system configurations, or service permissions.

Under configurations where the database process runs with superuser privileges or filesystem write access, attackers can escalate access. Utilizing PostgreSQL functions such as COPY ... FROM PROGRAM or standard large objects APIs allows the executing process to execute arbitrary OS commands, achieving remote code execution on the hosting infrastructure.

Remediation and Verification

The standard remediation pathway is upgrading the GeoTools library dependency to a patched release. All applications using the gt-jdbc-postgis package must ensure they build against secure library versions.

The vulnerability is resolved in GeoTools releases 33.6, 34.5, and 35.1. Developers utilizing Maven or Gradle build environments should update their dependency configurations to reflect these versions or newer releases.

If immediate deployment of upgraded software is not possible, administrative workarounds must be applied. Configure database user connection pools with limited privileges, restricting access to administrative system tables and filesystems. Implement rules on Web Application Firewalls (WAF) to search for and block HTTP requests featuring SQL keywords or unmatched single quotes within the ECQL or WFS request payload.

Official Patches

GeoTools GitOfficial remediation patch commit
GeoTools Pull RequestAssociated pull request

Fix Analysis (1)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected Systems

GeoTools geospatial libraryGeoServer installations leveraging PostGIS data storesJava-based spatial middleware utilizing gt-jdbc-postgis modules

Affected Versions Detail

Product
Affected Versions
Fixed Version
GeoTools
OSGeo
>= 30.5, < 33.633.6
GeoTools
OSGeo
>= 34.0, < 34.534.5
GeoTools
OSGeo
35.035.1
AttributeDetail
CWE IDCWE-89
Attack VectorNetwork (AV:N)
CVSS v3.19.8 (Critical)
Exploit StatusPoC (Proof of Concept)
ImpactUnauthenticated SQL Injection & potential Remote Code Execution
Componentgt-jdbc-postgis (PostGIS DataStore)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-89
SQL Injection

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

References & Sources

  • [1]GitHub Security Advisory GHSA-mqjf-5f49-2fjh
  • [2]GeoTools Remediation Commit d821c4d321dd91c22e31fcd5b1ce676645da5176
  • [3]GeoTools Pull Request 5829
  • [4]GeoTools 33.6 Release Tag
  • [5]GeoTools 34.5 Release Tag
  • [6]GeoTools 35.1 Release Tag
  • [7]OSGeo Bug Tracker GEOT-7589
  • [8]OSGeo Bug Tracker GEOT-7958
  • [9]OSGeo Bug Tracker GEOT-7959

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•4 minutes ago•CVE-2026-63004
5.5

CVE-2026-63004: Server-Side Request Forgery in Unleash Addon and Integration Subsystem

CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.

Amit Schendel
Amit Schendel
0 views•8 min read
•about 1 hour ago•CVE-2026-63466
4.1

CVE-2026-63466: Process-Wide Security Degradation via Global Module Mutation in Unleash

Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.

Alon Barad
Alon Barad
1 views•6 min read
•about 3 hours ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 4 hours ago•CVE-2026-63421
7.5

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Alon Barad
Alon Barad
3 views•6 min read
•about 5 hours ago•CVE-2026-64679
8.1

CVE-2026-64679: Directory Traversal via Workspace Parameter in Atlantis

A critical path traversal vulnerability in Atlantis allows authenticated users or repository contributors to execute directory operations outside of the repository directory boundary via crafted workspace parameters in configuration files or API requests.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 6 hours ago•CVE-2026-76905
7.5

CVE-2026-76905: Denial of Service via Nil-Pointer Dereference in getkin/kin-openapi openapi3filter

CVE-2026-76905 is a high-severity Denial of Service (DoS) vulnerability in the getkin/kin-openapi library, specifically inside the openapi3filter sub-package. When processing multipart/form-data request validation errors, a missing nil-pointer guard causes a Go runtime panic during error formatting. This panic terminates the active server process if no recovery handler is present, resulting in a total denial of service. The vulnerability affects versions from v0.10.0 to v0.140.0, and is resolved in v0.141.0.

Alon Barad
Alon Barad
6 views•6 min read