Vulnerability record · CVE-2024-36401 · published 1 July 2024
CVE-2024-36401: GeoServer OGC request parameter XPath eval injection enables unauthenticated RCE
Geoserver · Geoserver
GeoServer versions before 2.22.6, 2.23.6, 2.24.4, and 2.25.2 unsafely evaluate OGC request parameters as XPath expressions via the GeoTools commons-jxpath path. Because the vulnerable evaluation is applied to simple feature types, all default GeoServer instances are affected, and unauthenticated attackers can achieve remote code execution.
Description
GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.22.6, 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.22.6, 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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityUnauthenticated network-reachable remote code execution with CVSS 9.8, KEV listing, and near-maximum EPSS makes this an urgent patch-first issue.
What it is
GeoServer versions before 2.22.6, 2.23.6, 2.24.4, and 2.25.2 unsafely evaluate OGC request parameters as XPath expressions via the GeoTools commons-jxpath path. Because the vulnerable evaluation is applied to simple feature types, all default GeoServer instances are affected, and unauthenticated attackers can achieve remote code execution.
Impact
An unauthenticated attacker can execute arbitrary code on the GeoServer host, leading to full compromise of the server and any data or credentials it can reach.
Attack surface
Reachable over the network through OGC endpoints including WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic, and WPS Execute. No authentication or user interaction is required per the CVSS vector (AV:N/AC:L/PR:N/UI:N).
Exploitation
CISA added it to KEV on 2024-07-15 with a 2024-08-05 remediation due date, and EPSS is 0.99813 (99.958th percentile); reference tags include Exploit, indicating public exploitation activity.
What to do
- Upgrade GeoServer to 2.22.6, 2.23.6, 2.24.4, or 2.25.2 or later.
- If patching is not immediately possible, remove the gt-complex-x.y.jar file from the GeoServer installation as a workaround, accepting that some functionality may break or GeoServer may fail to deploy if the module is required.
- Restrict network access to GeoServer OGC endpoints to trusted clients until patched.
- Follow CISA KEV required action: apply vendor mitigations or discontinue use of the product if mitigations are unavailable.
Detection
- Inspect GeoServer access logs for OGC requests (WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic, WPS Execute) containing XPath or expression-like parameter values.
- Monitor for unexpected child processes spawned by the GeoServer Java process.
- Alert on outbound network connections from the GeoServer host to unfamiliar destinations.
- Review GeoServer logs for errors or stack traces involving commons-jxpath or XPath evaluation.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Exploitation in the wild
CISA added CVE-2024-36401 to the Known Exploited Vulnerabilities catalog on 15 July 2024 as "OSGeo GeoServer GeoTools Eval Injection Vulnerability". Required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable. Federal deadline 5 August 2024.
Affected products
2 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2024-36401 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2024-36401), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.