A critical vulnerability tracked as CVE-2024-36401 in GeoServer is being actively exploited in the wild, enabling unauthenticated remote code execution that can result in full server takeover.
The issue stems from the way GeoServer and its underlying GeoTools library evaluate certain property names. In default configurations these parameters can be processed as XPath expressions, allowing malicious payloads to trigger code execution via the commons-jxpath library.
Attackers can abuse multiple OGC services to reach the vulnerable code path. Affected request types include WFS operations such as GetFeature and GetPropertyValue, WMS calls including GetMap, GetFeatureInfo and GetLegendGraphic, as well as WPS Execute requests. Any internet-facing instance publishing these endpoints is at immediate risk.
Observed attack chains follow a familiar pattern: initial compromise via the CVE-2024-36401 exploit, network reconnaissance, lateral movement, and persistence through web shells. One frequently deployed tool is the China Chopper web shell, valued by attackers for its simplicity and resilience after service restarts.
Official fixes are already available. Patched releases include GeoServer 2.22.6, 2.23.6, 2.24.4 and 2.25.2. Administrators should update without delay and assume any previously exposed, unpatched instance may be compromised.
When patching cannot be completed immediately, a temporary mitigation involves removing the gt-complex JAR file from the deployment. This step reduces the attack surface but may disable required functionality or prevent service startup; testing in a staging environment is strongly advised.
Additional hardening measures include limiting access by IP address, enforcing VPN connectivity, deploying an authenticating reverse proxy, and continuously reviewing GeoServer and web-server logs for suspicious WFS, WMS and WPS requests containing unusual filter parameters.


