CVE-2024-36401
Remote Code Execution (RCE) vulnerability in evaluating property name expressions in Geoserver
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.
In plain language
AI Act nowCVE-2024-36401 is a critical, unauthenticated remote code execution flaw in GeoServer (and some GeoTools components) that can let an internet attacker take over your server; if you run GeoServer versions earlier than the fixed releases, you should act immediately.
Unauthenticated Remote Code Execution in GeoServer arises from unsafe evaluation of “property name” values as XPath expressions in various OGC request parameters, allowing arbitrary code execution over the network; GeoServer versions prior to 2.22.6, 2.23.6, 2.24.4, and 2.25.2 are affected.
What to do now
- Check your GeoServer version and whether it is older than 2.22.6, 2.23.6, 2.24.4, or 2.25.2.
- If you are using GeoServer, upgrade the affected modules to the fixed release that matches your line: gs-web-app 2.24.4 (or 2.25.2), gs-wfs 2.24.4 (or 2.25.2), and gs-wms 2.24.4 (or 2.25.2).
- If your GeoServer stack includes GeoTools, upgrade GeoTools to 29.6.
- If you cannot patch immediately, remove the vulnerable
gt-complex-x.y.jarfile from GeoServer (for example,gt-complex-31.1.jarif running 2.25.1), and be prepared for possible functionality loss or deployment issues.
CVSS Vector Breakdown
AV:NAttack VectorAC:LAttack ComplexityPR:NPrivileges RequiredUI:NUser InteractionS:UScopeC:HConfidentialityI:HIntegrityA:HAvailabilityWeaknesses
Affected Products
Exploitability
Required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Exploit details including PoC links, Metasploit modules, and scanner templates are available after registration.
View exploit detailsAttack Graph
Click technique nodes for MITRE ATT&CK details · drag to pan · Ctrl/⌘ + scroll to zoom, or go fullscreen.
MITRE ATT&CK
2 techniquesReferences
- Rondo Meets Geoserver - SANS Internet Storm Centeren·SANS Internet Storm Center· PoC GeoServer rce
- New SharkLoader Malware Deploys Cobalt Strike in StrikeShark Cyberattacksen·The Hacker News· PoC Microsoft SharePoint malware
- StrikeShark: investigating a new campaign delivering Cobalt Strike through SharkLoaderen-us·Kaspersky Securelist· Research SharkLoader malware
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2024-36401 and every CVE in our database. Create a free account — no credit card required.
Create Free Account