CVE-2024-24749 Classpath resource disclosure in GWC Web Resource API on Windows / Tomcat
Attackers can read arbitrary classpath resources and potentially gain admin privileges on Windows/Tomcat deployments with embedded data directories.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-24749?
CVE-2024-24749 is a high-severity path traversal vulnerability in geoserver, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.23.5 and 2.24.3, if GeoServer is deployed in the Windows operating system using an Apache Tomcat web application server, it is possible to bypass existing input validation in the GeoWebCache ByteStreamController class and read arbitrary classpath resources with specific file name extensions. If GeoServer is also deployed as a web archive using the data directory embedded in the `geoserver.war` file (rather than an external data directory), it will likely be possible to read specific resources to gain administrator privileges. However, it is very unlikely that production environments will be using the embedded data directory since, depending on how GeoServer is deployed, it will be erased and re-installed (which would also reset to the default password) either every time the server restarts or every time a new GeoServer WAR is installed and is therefore difficult to maintain. An external data directory will always be used if GeoServer is running in standalone mode (via an installer or a binary). Versions 2.23.5 and 2.24.3 contain a patch for the issue. Some workarounds are available. One may change from a Windows environment to a Linux environment; or change from Apache Tomcat to Jetty application server. One may also disable anonymous access to the embeded GeoWebCache administration and status pages.
Weakness: CWE-22
Which versions are affected by CVE-2024-24749?
8 open source packages ship an affected version, including org.geoserver.web:gs-web-app and org.geoserver:gs-gwc. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.geoserver.web:gs-web-app Maven | All versions | 2.23.5 |
org.geoserver.web:gs-web-app Maven | All versions | 2.23.5 |
org.geoserver.web:gs-web-app Maven | From 2.24.0 | 2.24.3 |
org.geoserver.web:gs-web-app Maven | From 2.24.0 | 2.24.3 |
org.geoserver:gs-gwc Maven | All versions | 2.23.5 |
org.geoserver:gs-gwc Maven | All versions | 2.23.5 |
2 more packages
org.geoserver:gs-gwc Maven | From 2.24.0 | 2.24.3 |
org.geoserver:gs-gwc Maven | From 2.24.0 | 2.24.3 |
Products include Geoserver Geoserver.
How do I fix CVE-2024-24749?
Upgrade org.geoserver.web:gs-web-app to a fixed version for your release line: 2.23.5 or 2.24.3.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-24749 being exploited?
There is no known exploitation of CVE-2024-24749 in the wild and no public exploit code.
Other vulnerabilities in geoserver
- CVE-2024-36401 OSGeo GeoServer GeoTools Eval Injection
- CVE-2025-58360 OSGeo GeoServer Improper Restriction of XML External Entity Reference
- CVE-2023-35042 GeoServer RCE due to improper control of generation of code in jai-ext`Jiffle` map algebra language
- CVE-2023-41877 GeoServer log file path traversal vulnerability
- CVE-2023-51444 GeoServer arbitrary file upload vulnerability in REST Coverage Store API
Sources
Also known as GHSA-jhqx-5v5g-mpf3.