## https://sploitus.com/exploit?id=8A12E42D-C8DB-5595-A528-D070A44E862E
# CVE-2024-36401-poc
CVE-2024-36401 is a high-risk remote code execution vulnerability in GeoServer. GeoServer is an open-source geospatial data server software, primarily used for publishing, sharing, and processing various geospatial datasets.
**Vulnerability Details:**
This vulnerability stems from GeoServer’s improper parsing of attribute names as XPath expressions. Specifically, the GeoTools library API, when evaluating attribute names for element types, passes them to the commons-jxpath library in an insecure manner. Since the commons-jxpath library allows arbitrary code to be executed during XPath expression parsing, attackers can execute arbitrary code remotely without authentication, by constructing specific inputs using multiple OGC request parameters such as WFS GetFeature, WFS GetPropertyValue, WMS GetMap, etc.
**Impact:**
An attacker who successfully exploits this vulnerability can execute arbitrary code on affected GeoServer instances, thereby gaining full control over the server. This could lead to sensitive data leaks, service interruptions, or further cyberattacks, posing serious security risks to organizations.
**Affected Versions:**
- Versions prior to GeoServer 2.23.6
- Versions 2.24.0 to 2.24.3 of GeoServer
- Versions 2.25.0 to 2.25.1 of GeoServer
**Fix Recommendations:**
The official team has released patches for this vulnerability. It is recommended that affected users upgrade to the following versions as soon as possible:
- GeoServer 2.23.6 or higher
- GeoServer 2.24.4 or higher
- GeoServer 2.25.2 or higher
Additionally, the official team has provided patches for earlier versions, including updated versions of the gt-app-schema, gt-complex, and gt-xsd-core jar files. Users can download these patches from the GeoServer release page and replace the affected files to fix the vulnerabilities. Before upgrading or applying patches, it is recommended to assess potential impacts and test the system in a testing environment to ensure stability and compatibility.