SQL Injection Affecting org.geoserver.community:gs-jdbcconfig package, versions [0,]


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
54.61% (98th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGGEOSERVERCOMMUNITY-3329428
  • published22 Feb 2023
  • disclosed22 Feb 2023
  • creditsikeoka

Introduced: 22 Feb 2023

CVE-2023-25157  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

org.geoserver.community:gs-jdbcconfig is a GeoServer Catalog configuration management in a databse.

Affected versions of this package are vulnerable to SQL Injection due to improper escape of user input. Exploiting this vulnerability is possible via the followings:

  1. PropertyIsLike filter, when used with a String field and any database DataStore, or with a PostGIS DataStore with encode functions enabled

  2. strStartsWith function, when used with a PostGIS DataStore with encode functions enabled

  3. FeatureId filter, when used with any database table having a String primary key column and when prepared statements are disabled

  4. jsonArrayContains function, when used with a String or JSON field and with a PostGIS or Oracle DataStore (GeoServer 2.22.0+ only)

  5. DWithin filter, when used with an Oracle DataStore

Workarounds:

Disabling the PostGIS Datastore encode functions setting to mitigate strEndsWith, strStartsWith vulnerabilities (Like filters have no mitigation, if there is a string field in the feature type published).

Enabling the PostGIS DataStore preparedStatements setting to mitigate the FeatureId vulnerability.

CVSS Scores

version 3.1