CVE-2024-36404
LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.
What the vulnerability is
GeoTools is an open source Java library that provides tools for geospatial data. Prior to versions 31.2, 30.4, and 29.6, Remote Code Execution (RCE) is possible if an application uses certain GeoTools functionality to evaluate XPath expressions supplied by user input. Versions 31.2, 30.4, and 29.6 contain a fix for this issue. As a workaround, GeoTools can operate with reduced functionality by removing the `gt-complex` jar from one's application. As an example of the impact, application schema `datastore` would not function without the ability to use XPath expressions to query complex content. Alternatively, one may utilize a drop-in replacement GeoTools jar from SourceForge for versions 31.1, 30.3, 30.2, 29.2, 28.2, 27.5, 27.4, 26.7, 26.4, 25.2, and 24.0. These jars are for download only and are not available from maven central, intended to quickly provide a fix to affected applications.
Scores
- CVSS: 9.8 (critical)
- EPSS: 76.06% chance of exploitation in the next 30 days
- CISA KEV: Not listed
- Published: 2024-07-02
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
How to mitigate it
Upgrade GeoTools to 29.6, 30.4, 31.2 or later
Patch or upgrade. GeoTools before 29.6, 30.4 and 31.2 evaluates XPath expressions from user input as code, so a remote user runs commands in applications such as GeoServer. The fixed releases restrict the evaluation.
Applies to: GeoTools before 29.6, 30.0 to 30.3 and 31.0 to 31.1, and applications that bundle it.
- Find the GeoTools version in the application (gt-complex and gt-app-schema jar names), or the GeoServer version that bundles it.
- Upgrade GeoTools to 29.6, 30.4, 31.2 or later; for GeoServer upgrade to 2.23.6, 2.24.4, 2.25.2 or later.
- If you cannot upgrade now, remove the gt-complex jar (this disables application schema data stores) or use the patched jars from the advisory.
- Restart the application.
Sources:
Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.
We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.