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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    57.95% (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 ID SNYK-JAVA-ORGGEOSERVERCOMMUNITY-3329428
  • published 22 Feb 2023
  • disclosed 22 Feb 2023
  • credit sikeoka

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
Expand this section

Snyk

9.8 critical
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

9.8 critical