CVE-2024-36401

9.8 CRITICAL

📋 TL;DR

This vulnerability allows unauthenticated remote attackers to execute arbitrary code on GeoServer instances by sending specially crafted OGC requests. It affects ALL default GeoServer installations due to unsafe XPath evaluation in the GeoTools library. Organizations using vulnerable GeoServer versions for geospatial data sharing are at immediate risk.

💻 Affected Systems

Products:
  • GeoServer
Versions: All versions prior to 2.22.6, 2.23.6, 2.24.4, and 2.25.2
Operating Systems: All operating systems running GeoServer
Default Config Vulnerable: ⚠️ Yes
Notes: Affects ALL GeoServer instances regardless of configuration due to vulnerable code in GeoTools library.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, deploy ransomware, or pivot to internal networks.

🟠

Likely Case

Remote code execution leading to data exfiltration, service disruption, or installation of backdoors for persistent access.

🟢

If Mitigated

Attack attempts are blocked at network perimeter, with no successful exploitation due to patched systems and proper access controls.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation confirmed through multiple OGC request types (WFS GetFeature, WMS GetMap, etc.) but no public PoC available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.22.6, 2.23.6, 2.24.4, or 2.25.2

Vendor Advisory: https://github.com/geoserver/geoserver/security/advisories/GHSA-6jj6-gm7p-fcvv

Restart Required: Yes

Instructions:

1. Identify current GeoServer version. 2. Download appropriate patched version (2.22.6, 2.23.6, 2.24.4, or 2.25.2). 3. Backup configuration and data. 4. Stop GeoServer service. 5. Install patched version. 6. Restart GeoServer service. 7. Verify functionality.

🔧 Temporary Workarounds

Remove vulnerable gt-complex library

all

Removes the vulnerable GeoTools complex module to eliminate attack surface

find /path/to/geoserver -name "gt-complex-*.jar" -delete

🧯 If You Can't Patch

  • Implement strict network access controls to limit GeoServer exposure
  • Deploy WAF rules to block suspicious OGC request patterns

🔍 How to Verify

Check if Vulnerable:

Check GeoServer version via web interface admin panel or examine WEB-INF/lib directory for gt-complex JAR files

Check Version:

Check web interface at http://geoserver-host:port/geoserver/web or examine version.txt in installation directory

Verify Fix Applied:

Confirm version is 2.22.6, 2.23.6, 2.24.4, or 2.25.2 and gt-complex JAR is either removed or updated

📡 Detection & Monitoring

Log Indicators:

  • Unusual OGC requests with complex XPath expressions
  • Multiple failed authentication attempts followed by successful requests
  • Java process spawning unexpected child processes

Network Indicators:

  • Spike in requests to /geoserver/wfs, /geoserver/wms, or /geoserver/wps endpoints
  • Requests containing unusual property names or XPath-like syntax

SIEM Query:

source="geoserver.log" AND ("GetFeature" OR "GetMap" OR "Execute") AND ("property" OR "attribute" OR "xpath")

🔗 References

📤 Share & Export