CVE-2024-36401
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.
Weakness
- CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code
CISA Known Exploited Vulnerabilities entry
| Vulnerability name | OSGeo GeoServer GeoTools Eval Injection Vulnerability |
|---|---|
| Vendor / product | OSGeo / GeoServer |
| Date added | 2024-07-15 |
| Federal remediation due date | 2024-08-05 |
| Required action | Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable. |
| Known ransomware campaign use | Unknown |
CISA SSVC decision points
| Exploitation | active |
|---|---|
| Automatable | yes |
| Technical impact | total |
| Scored | 2024-07-13 |
Timeline
- 2024-07-01Published by the CNA15:25 UTC
- 2024-07-01GitHub advisory published (GHSA-6jj6-gm7p-fcvv)same day
- 2024-07-13CISA SSVC decision recorded12 days after publication
- 2024-07-15Added to the CISA KEV catalog14 days after publication
Exploit and advisory records
Nuclei templates:
- CVE-2024-36401: GeoServer RCE in Evaluating Property Name Expressions
GitHub advisory GHSA-6jj6-gm7p-fcvv, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Maven org.geoserver.web:gs-web-app | before 2.22.6 | 2.22.6 |
| Maven org.geoserver.web:gs-web-app | from 2.23.0 before 2.23.6 | 2.23.6 |
| Maven org.geoserver.web:gs-web-app | from 2.24.0 before 2.24.4 | 2.24.4 |
| Maven org.geoserver.web:gs-web-app | from 2.25.0 before 2.25.2 | 2.25.2 |
| Maven org.geoserver:gs-wfs | before 2.22.6 | 2.22.6 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| geoserver geoserver | before 2.22.6fixed in 2.22.6from 2.23.0 before 2.23.6fixed in 2.23.6from 2.24.0 before 2.24.4fixed in 2.24.4from 2.25.0 before 2.25.2fixed in 2.25.2 | 2.22.62.23.62.24.42.25.2 |
| geotools geotools | before 29.6fixed in 29.6from 30.1 before 30.4fixed in 30.4from 31.1 before 31.2fixed in 31.230.0no fix listed31.0no fix listed | 29.630.431.2not listednot listed |
References
- https://github.com/geotools/geotools/pull/4797
- https://github.com/geoserver/geoserver/security/advisories/GHSA-6jj6-gm7p-fcvv
- https://github.com/geotools/geotools/security/advisories/GHSA-w3pj-wh35-fq8w
- https://osgeo-org.atlassian.net/browse/GEOT-7587
- https://github.com/Warxim/CVE-2022-41852?tab=readme-ov-file#workaround-for-cve-2022-41852
- https://www.vicarius.io/vsociety/posts/geoserver-rce-cve-2024-36401
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-36401
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2024-36401'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2024-36401'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2024-36401'curl 'https://api.contrastcyber.com/cve_products/CVE-2024-36401'curl 'https://api.contrastcyber.com/kev_lookup/CVE-2024-36401'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).