CVE CVE

CVE-2024-36401

CISA Known Exploited Vulnerability (KEV)

OSGeo GeoServer GeoTools Eval Injection Vulnerability

July 15, 2024

August 5, 2024

Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Description

GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.23.6, 2.24.4, and 2.25.2, multiple OGC request parameters allow Remote Code Execution (RCE) by unauthenticated users through specially crafted input against a default GeoServer installation due to unsafely evaluating property names as XPath expressions.

The GeoTools library API that GeoServer calls evaluates property/attribute names for feature types in a way that unsafely passes them to the commons-jxpath library which can execute arbitrary code when evaluating XPath expressions. This XPath evaluation is intended to be used only by complex feature types (i.e., Application Schema data stores) but is incorrectly being applied to simple feature types as well which makes this vulnerability apply to **ALL** GeoServer instances. No public PoC is provided but this vulnerability has been confirmed to be exploitable through WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic and WPS Execute requests. This vulnerability can lead to executing arbitrary code.

Versions 2.23.6, 2.24.4, and 2.25.2 contain a patch for the issue. A workaround exists by removing the `gt-complex-x.y.jar` file from the GeoServer where `x.y` is the GeoTools version (e.g., `gt-complex-31.1.jar` if running GeoServer 2.25.1). This will remove the vulnerable code from GeoServer but may break some GeoServer functionality or prevent GeoServer from deploying if the gt-complex module is needed.

Weakness Enumeration

CWE-ID CWE Name

CWE-94
Improper Control of Generation of Code (‘Code Injection’)

CWE-95
Improper Neutralization of Directives in Dynamically Evaluated Code (‘Eval Injection’)

Known Affected Software Configurations


cpe:2.3:a:geoserver:geoserver:2.23.4:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.22.3:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.25.1:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.23.6:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:28.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:30.3:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.23.3:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.24.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:28.5:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:29.5:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:29.2:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.25.0:-:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:30.0:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:29.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:29.4:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.22.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:31.0:-:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.25.0:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:30.0:-:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.23.0:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.23.5:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:28.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:31.0:rc:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.25.2:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.24.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:29.1:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.24.1:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.22.5:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.24.0:-:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:30.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:31.1:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.23.2:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.22.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:29.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:30.2:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.24.0:rc:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.23.1:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:2.24.4:*:*:*:*:*:*:*

cpe:2.3:a:geoserver:geoserver:-:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:28.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:26.7:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:25.7:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24.7:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15:beta:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15:milestone0:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15:rc1:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:23:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:17:beta:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16:beta:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:19:beta:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:21:milestone0:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:19:rc1:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16:milestone0:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:17:rc1:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:21:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16:rc1:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15:beta2:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:28:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:18:rc1:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:27:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:26:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:18:beta:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:25:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24:rc:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:17.5:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:15.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:24.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:20.5:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:16.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:23.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:23.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:23.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:23.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22.5:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22.1:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22.2:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:17.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:23.4:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22.3:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:22.0:*:*:*:*:*:*:*

cpe:2.3:a:geotools:geotools:17.1:*:*:*:*:*:*:*

Details

Source:
NVD
Published:
Updated:

Risk information

CVSS v3

Base score:
9.8
Severity:

CRITICAL

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

CVSS v2

Not defined