Exploit
CVE-2024-36401

Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') (CWE-95)

Published: Jul 1, 2024 / Updated: 4mo ago

010
CVSS 9.8EPSS 95.88%Critical
CVE info copied to clipboard

Summary

GeoServer versions prior to 2.23.6, 2.24.4, and 2.25.2 contain a critical vulnerability allowing Remote Code Execution (RCE) by unauthenticated users. The vulnerability stems from the GeoTools library API unsafely evaluating property names as XPath expressions in multiple OGC request parameters. This affects ALL GeoServer instances, as it incorrectly applies XPath evaluation intended for complex feature types to simple feature types as well. The vulnerability is exploitable through various requests including WFS GetFeature, WFS GetPropertyValue, WMS GetMap, WMS GetFeatureInfo, WMS GetLegendGraphic, and WPS Execute.

Impact

The impact of this vulnerability is severe. It can lead to executing arbitrary code on affected GeoServer instances, potentially compromising the confidentiality, integrity, and availability of the system. This vulnerability requires no user interaction, can be exploited over the network, and does not require any privileges, making it a critical threat to all unpatched GeoServer installations. The vulnerability has a CVSS v3.1 base score of 9.8 (Critical), indicating maximum impact on confidentiality, integrity, and availability. Multiple proof-of-concept exploits are available, and the vulnerability is actively being exploited in the wild, having been added to the CISA Known Exploited Vulnerability list.

Exploitation

Multiple proof-of-concept exploits are available on github.com, github.com, github.com, github.com. The vulnerability is actively being exploited in the wild and was added to the CISA Known Exploited Vulnerability list. Its exploitation has been reported by various sources, including cisa.gov. Malware such as EAGLEDOOR (source:SOC Prime Blog), Cobalt Strike (source:Malware Archives • Cybersecurity News), GOREVERSE (source:IT Security News), JenX (source:APT Archives), SideWalk (Windows) (source:Vumetric) are known to have weaponized this vulnerability. Threat actors including Earth Baxia (source:Trend Micro Research, News, Perspectives), APT41 (source:APT Archives) have reportedly exploited this vulnerability.

Patch

Patches are available in GeoServer versions 2.23.6, 2.24.4, and 2.25.2. Users should update to these versions or later to mitigate the vulnerability. Given the critical nature of this vulnerability, updating should be treated as a high-priority task for all affected GeoServer installations.

Mitigation

For immediate mitigation, a workaround exists by removing the `gt-complex-x.y.jar` file from the GeoServer installation, where `x.y` is the GeoServer version (e.g., `gt-complex-31.1.jar` for GeoServer 2.25.1). However, this may break some GeoServer functionality or prevent deployment if the gt-complex module is needed. Therefore, the best course of action is to update to the patched versions (2.23.6, 2.24.4, or 2.25.2 or later) as soon as possible. Given the critical nature of this vulnerability, with its high CVSS score and potential for remote code execution without authentication, patching should be prioritized as a matter of urgency for all affected GeoServer installations.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Timeline

First Article

Feedly found the first article mentioning CVE-2024-36401. See article

Jun 19, 2024 at 8:05 AM / #foss4g
CVSS Estimate

Feedly estimated the CVSS score as HIGH

Jun 19, 2024 at 8:05 AM
Detection in Vulnerability Scanners

Detection for the vulnerability has been added to Qualys (5000296)

Jul 1, 2024 at 7:53 AM
CVE Assignment

NVD published the first details for CVE-2024-36401

Jul 1, 2024 at 4:15 PM
EPSS

EPSS Score was set to: 0.05% (Percentile: 15.7%)

Jul 2, 2024 at 8:15 PM
Proof of Concept (PoC) Released

A proof of concept exploit has been released

Jul 3, 2024 at 5:10 PM
Threat Intelligence Report

The vulnerability CVE-2024-36401 in GeoServer allows unauthenticated users to execute Remote Code Execution (RCE) through specially crafted input, impacting versions prior to 2.25.1, 2.24.3, and 2.23.5. This critical vulnerability has the potential for exploitation in the wild, with proof-of-concept exploits available. It is advised to update to secure versions and implement mitigations to prevent unauthorized code execution and potential downstream impacts on third-party vendors utilizing GeoServer. See article

Jul 8, 2024 at 7:55 PM
Exploitation in the Wild

Attacks in the wild have been reported by CISA Known Exploited Vulnerability.

Jul 15, 2024 at 2:40 PM / CISA Known Exploited Vulnerability
Exploitation in the Wild

Attacks in the wild have been reported by CISA - Known exploited vulnerabilities catalog. See article

Static CVE Timeline Graph

Affected Systems

Geotools/geotools
+null more

Exploits

https://github.com/Warxim/CVE-2022-41852?tab=readme-ov-file#workaround-for-cve-2022-41852
+null more

Proof Of Exploit

https://www.cisa.gov/known-exploited-vulnerabilities-catalog
+null more

Patches

Github Advisory
+null more

Links to Malware Families

SideWalk
+null more

Links to Threat Actors

Axiom
+null more

Attack Patterns

CAPEC-35: Leverage Executable Code in Non-Executable Files
+null more

Vendor Advisory

[GHSA-6jj6-gm7p-fcvv] Remote Code Execution (RCE) vulnerability in geoserver
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 by an extension you are using: Mitigation for geoserver.war deploy: Stop the application server Locate the file webapps/geoserver/WEB-INF/lib/gt-complex-x.y.jar and remove

References

CVE-2024-36401 Remote Code Execution (RCE) vulnerability in evaluating property name expressions
GeoServer security policy provides one year of support. Upgrade GeoServer twice a year as new stable releases are made.
GeoServer 2.25.2 Release
GEOS-11390 Replace TestWfsPost with Javascript Demo Page GEOS-11390 Replace TestWfsPost with Javascript Demo Page
GeoServer RCE Attack
A remote code execution vulnerability affecting GeoServer is under active exploitation, with recent attack attempts observed on 40,000+ FortiGuard sensors. This vulnerability (CVE-2024-36401) is suspected to be exploited by the Earth Baxia APT group, as reported by FortiGuard Recon and the root cause of the vulnerability lies in the absence of proper input validation during request handling, posing a significant risk of system compromise upon successful exploitation.
See 31 more references

News

Security Affairs newsletter Round 498 by Pierluigi Paganini – INTERNATIONAL EDITION
SECURITY AFFAIRS MALWARE NEWSLETTE
Security Affairs newsletter Round 498 by Pierluigi Paganini – INTERNATIONAL EDITION
SECURITY AFFAIRS MALWARE NEWSLETTE
U.S. CISA adds Palo Alto Networks Expedition bugs to its Known Exploited Vulnerabilities catalog
Microsoft Patch Tuesday security updates for November 2024 fix two actively exploited zero-days. . Ahold Delhaize experienced a cyber incident ...
Multiple malware families delivered exploiting GeoServer GeoTools flaw CVE-2024-36401
Multiple malware families delivered exploiting GeoServer GeoTools flaw CVE-2024-36401
Mozi Resurfaces as Androxgh0st Botnet: Unraveling The Latest Exploitation Wave
NOTE : Use Public READ only user credentials on login page banner. The Androxgh0st botnet, active since January 2024, has evolved to incorporate Mozi botnet payloads, expanding its attack surface from web servers to IoT devices.
See 389 more articles and social media posts

CVSS V3.1

Attack Vector:Network
Attack Complexity:Low
Privileges Required:None
User Interaction:None
Scope:Unchanged
Confidentiality:High
Integrity:High
Availability Impact:High

Categories

Be the first to know about critical vulnerabilities

Collect, analyze, and share vulnerability reports faster using AI